Auth Refresh Tokens - React Tutorial 48

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


~~~~~~~~~~~~~~~ CONNECT ~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~ SUPPORT ME ~~~~~~~~~~~~~~

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

Okay, I’ve been subscribed a couple of years now. You were doing SQL videos when I needed them back in college, and now I’m doing a react job that requires the use of token based authentication, and last night I was stuck on a refresh token problem and here you are again, stepping in to save me.
Caleb Curry you’re my hero.

SauerkrautNCheese
Автор

You should show how to include the cleanup function to remove the set interval

codesymphony
Автор

Hey Caleb, I have a UserContextProvider component that returns its children wrapped in a UserContext.Provider. I was trying to do your UseEffect function within the aformentioned component. When I log in, the refresh interval starts as expected (after checking if the user is logged in). But when I log out, the interval does not stop. I thought it would, because I thought my isAuthenticated value would become false. Do I just need to run clearinterval() in the useeffect's cleanup?

Nullfighter
Автор

Really Bro????🙃🙃🙃🙃. Are you kidding me??? which wise programmer do it just like you? have you every worked with laravel ? if you worked wih laravel you understood laravel framework refresh token in every post request. not just like you .

farhadvakilijamil