JWT Authentication for React and FastAPI (easy with code)

  Рет қаралды 12,571

Eric Roby

Eric Roby

Күн бұрын

Пікірлер: 26
@yadavakash2609
@yadavakash2609 6 ай бұрын
This is called the perfect timing, I was struggling to authenticate user in protected pages. Thanks to you and your precise explaination, I got the answer.
@codingwithroby
@codingwithroby 6 ай бұрын
You're so welcome! Keep the grind going 🙂
@herozero777
@herozero777 2 ай бұрын
Very perfect timing for me too. A while back I got into React and FastAPI combo watching your tutorial and now this step was missing. Thanks for this man! Much Appreciated.
@codingwithroby
@codingwithroby 2 ай бұрын
Great to hear! Cheers!
@fooktu
@fooktu 6 ай бұрын
Overall great video! What is missing here is showing how to secure enpoints in the fastapi so that they are protected and how to make queries on the frontend to those enpoints (how to include token etc).
@codingwithroby
@codingwithroby 6 ай бұрын
Great suggestion! What you want to do is use a UserDependency on the BE and add Authorization: Bearer as a header on the FE.
@theverbalremedy
@theverbalremedy 3 ай бұрын
Hi ​@@codingwithroby..could you make a video on how to do this please as its such a common occurrence? Most FastAPI applications are not on localhost, they're often hosted (e.g. on EC2) where theyre exposed for anyone to access. Then a React app calls the endpoint. Can you show how you protect these FastAPI endpoints (eg with Tokens) and havr a React app call it?
@souzafelix
@souzafelix 6 ай бұрын
Nice video! I had just created a fastapi+react authentication routes and your example gave me ideas to refactor some parts
@codingwithroby
@codingwithroby 6 ай бұрын
That's great! Keep on coding 🙂
@losdel21
@losdel21 2 ай бұрын
CORS is not really for protecting the server, it is something implemented in the browser to avoid pages making cross-requests. You can download a plug-in for firefox to ignore CORS headers for example.
@codingwithroby
@codingwithroby 2 ай бұрын
Thanks for the additional context that can help others!
@1mrnewton
@1mrnewton 6 ай бұрын
Nice video! Can you share which vscode theme you use?
@codingwithroby
@codingwithroby 6 ай бұрын
One Dark Pro - it is an extension 🙂
@loupa6128
@loupa6128 6 ай бұрын
Nice video. If I have a lot of pages that only an authenticated user can access, do I need to place the code of `useEffect` in each component?
@codingwithroby
@codingwithroby 6 ай бұрын
Thanks! Yeah you do - another way is to have the component sit inside a parent and the parent redoes the useEffect each time
@Andromeda26_
@Andromeda26_ 5 ай бұрын
Great as always! It would be great too if you deploy them on Vercel or AWS.
@codingwithroby
@codingwithroby 5 ай бұрын
I have a vercel video on here - I have a full AWS deployment course coming soon!
@Ziv-dw3mn
@Ziv-dw3mn 6 ай бұрын
Great video, i would suggest stop using create react app and use vite instead (So much faster)
@codingwithroby
@codingwithroby 6 ай бұрын
Thanks for the tip! I just started looking into vite for my future videos 🙂
@aTr41n95
@aTr41n95 6 ай бұрын
Thank you so much. This video was perfect. A+++++++
@codingwithroby
@codingwithroby 6 ай бұрын
Glad you liked it! Woot !!
@OpenDeepLearning
@OpenDeepLearning 6 ай бұрын
God bless you!
@codingwithroby
@codingwithroby 6 ай бұрын
I am glad you enjoy it 🙂
@Gelozo
@Gelozo 4 ай бұрын
ty!
@codingwithroby
@codingwithroby 4 ай бұрын
You bet!
Why You Should Learn FastAPI Today
6:12
Eric Roby
Рет қаралды 11 М.
FastAPI JWT Tutorial | How to add User Authentication
20:27
Eric Roby
Рет қаралды 62 М.
How Strong is Tin Foil? 💪
00:25
Brianna
Рет қаралды 70 МЛН
бабл ти гель для душа // Eva mash
01:00
EVA mash
Рет қаралды 9 МЛН
Мама у нас строгая
00:20
VAVAN
Рет қаралды 2,8 МЛН
СКОЛЬКО ПАЛЬЦЕВ ТУТ?
00:16
Masomka
Рет қаралды 2,5 МЛН
API Authentication: JWT, OAuth2, and More
6:12
ByteMonk
Рет қаралды 16 М.
JWT авторизация. Основы JWT - механизма.
6:45
Хочу вАйти
Рет қаралды 16 М.
Authentication & Refreshing Tokens Implementation
2:09:53
Dennis Ivy
Рет қаралды 241 М.
Stop Wasting Hours - Every Python Dev NEEDS to Master Poetry
10:54
FastAPI Authentication with  JWT (JSON Web Tokens)
56:18
Bek Brace
Рет қаралды 100 М.
Quickly Authenticate Users with FastAPI and Token Authentication
46:05
Akamai Developer
Рет қаралды 119 М.
How Strong is Tin Foil? 💪
00:25
Brianna
Рет қаралды 70 МЛН