FastAPI Authentication Example With OAuth2, JSON Web Tokens and Tortoise ORM

preview_player
Показать описание
In this video, I will show you how to implement authentication in your FastAPI apps. OAuth2 will be the type of authentication I demonstrate because it's very common among APIs, and I will use JSON web tokens (JWT) for the token in the OAuth flow. In addition to authentication, I'll use Tortoise ORM for the user model.

Рекомендации по теме
Комментарии
Автор

I am watching this 3 years later and it's still the best tutorial on this topic that I have found. Thanks for this.

ofranc
Автор

so structured, so modular. lately found this channel. you are way good in explaining things. Thanks a lot.

Vijay-Yarramsetty
Автор

awesome!! I was waiting for you to upload fastapi videos!!

Smoonwalkerm
Автор

Fantastic video, very clear and to the point! Thank you. For a follow-up video (could simply build on top of this code), it would be great to see how to implement expiration in the tokens and a (maybe automatic) refresh logic. Maybe with a dummy (just plain) HTML login page. Anyways, thanks for the great content.

mbalslow
Автор

Thanks so much! Your videos really helped me some years ago when I was coding in Python flask, and just as I start working on FastAPI you begin making videos in that area too 🙌🙌

ndk
Автор

Excelent video. I wasn't expecting to get so much knowledge in just 40 minutes. And very well explained!!! Thanks a million.

tonidelacalle
Автор

Very educational! I'm glad I ran into your channel

HitraNtheProgrammer
Автор

Ugh man, this is great. I'm learning OAuth2 and FastAPI at the same time and this was incredibly helpful to see the pieces work from the developer side.

aasd
Автор

Awesome as always. How about Some front-end registration and login form to help understand this better. Just me asking for more though.

Thanks for this video.

TheAremoh
Автор

This video actually gave me some insights into Pydantic, which I'm still trying to wrap my head around. So a tutorial using Pydantic more explicitly would be great. But you have a great back catalog already.

jccorman
Автор

Real good videos man! Been real helpful

Fsoza
Автор

Very nice video and excellent channel!! looking forward to see how to protect FastAPI with OAuth2 but just acting as a Resource Server (and getting the token from and external Authorization Server). Thanks for sharing!

juanfranciscolopez
Автор

Thank you. You always provide a good start point for development.
Do you think it is a good ideea to use tortoise-orm in production ?
Some devs say sqlalchemy is better for speeding up your api. I can configure sqlalchemy for a sync def, but failed configuring it for async.

adriancroitor
Автор

This video helped me a ton thanks dude.

jonxslays
Автор

Very nice introduction! Do you have a video explaining how we could extend from this example, attaching this with some other OAuth2.0 providers like Google? Thanks!

JordanCote
Автор

Awesome...this has helped so much. Any two-factor authentication, or 2FA implementation in the future?

aureliojmnz
Автор

thanks and that's awesome work . one more question now should pass the user in all new additional endpoints ??

ziaddwagy
Автор

Thank you !! If possible, can someone explain difference between uvicorn, gunicorn, hypercorn ?

hackwithharsha
Автор

Thank you so much for the video.. I want to try it with postgres but I could not find a way.. any recommendation is welcome..

davutlu
Автор

Thank you. Is there a way we can implement LDAP authentication ?

saurabh