React Login using Access & Refresh Tokens

preview_player
Показать описание

Learn how to Authenticate using Access & Refresh tokens using React.

Backends:

Want to learn to login using two-factor authentication or using your google account?
Check out these courses:

Get access to all my NodeJS courses for $8/month:

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

Hi. I'm working on a real project, and I'm having this situation. I found your approach by accident. Although it has few views, the quality is much better than the videos I found. I want to say thank you very much. Very good and realistic video :3

linhpink
Автор

I've been trying to solve this for over a week now.
I had to scroll all the way down to find this gem.

You're a great teacher man.

Note: Always scroll down on YouTube for quality and straight to the point video.

hilariousness
Автор

This is the simplest explanation and implementation of refresh token I've seen on YouTube. Every other ones are just overly vague and complex. Thank you and you earned a new subscriber.

hamedayinde
Автор

Wanted to tell you that you made my life easy after this.😌

atuldubey
Автор

Thank you so much! All other implementations I found were too vague

andrewmukare
Автор

If you're navigating unauthorized routes for that 30s then want to navigate to the authorized route the access token expires. Then the axios interceptor calls the /refresh route, but the /user endpoint fails again. This does not seem like a good user experience. You have to navigate away from the authorized route then back again to see the UI or the user name. Is this just how the updating with the Authorization header works? its not asynchronous on the frontend. I checked the code on github and its doing the same thing.

KeepItFresh
Автор

Finally someone who knows how to make a video that really explains, you are the king bro👑👑👑

eliyahomalca
Автор

Best video I have been searching for this all day. Thank you

ridamsinghal
Автор

I think I missed the backend part.
can anyone pinpoint it to me?
I want to see if it is similar to mine.

shashankpandey
Автор

Good one....

Please can you share the link for the back end?

patrickudeh
Автор

This save my life.. lol
Thank you very much for this video

mretineh
Автор

Thank you very much,
How to proceed if I store the refresh token in the database ?

RABAH
Автор

Is that safe way to save tokens, can attacers(XSS, CSRF) easly attack or it's secure in some way?

twanabrno
Автор

this was the clearest explanation of the videos i have watched. thank you so much bro

powarrcan
Автор

How are you receiving and storing the cookie on the browser when the server and client are on different domains?

I have been battling with this for days. I have read more articles, chat GPT, stack overflow etc in 5 days than I have in an entire year. The cookie is sent from the server but the browsers doesn't store it because if from a separate domain so please HOW 😢

desmondodion
Автор

Hi, Where can i find the server side code?

sakshitawani
Автор

what if i refresh the page, will that token be removed?

twanabrno
Автор

the cookie is set on the postman and but isn't being set on the browser while using react . What might be the problem?

sujit_ghimire
Автор

when I use WithCredentials in axios call I got this error:

nourhanashraf