My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more
Login Authentication in React JS
Login Authentication in React JS
#login-authentication-in-react-js
1 follower·7 articles
Preeti samuel
Discuss

·

78 likes

·

11.1K reads

Ahmad Yousif
I would do it slightly differently, I would send the rT in a cookie instead of sending it in the response , and in the frontend I resend this cookie on every request for protected route back to the backend and compare it's value with the original rT sent upon authentication which would be stored in the db, and maybe not storing the tokens in the local storage but rather in the memory.
6

You've reached the end! 👋