How to handle JWT token cookie from backend in React
Hi Everyone,
Need some guidance on a issue I am stuck on. I am mostly a backend developer and new to Frontend.
I am working on a service which has Spring Boot app as a backend; which is secured with Jwt token that is returned in HTTP Cookie. It has /login, /refresh-token endpoints to login and refresh expired tokens.
In frontend side, I am using React JS. I am able to integrate my frontend service with backend if there is no security aspect involved (i.e, when I turn off spring-security in backend). Now I want to integrate the security part but I am not able to figure it out what needs to be done, where should I start. How the token flow will happen.
I have tried to do some research but most of the examples I saw are using a boolean flag isAuthenticated stored in local storage which doesn't seems correct.
Could you please provide some guidance. Thanks
0 Replies