Need guidance/advice on implementing security in my react js app.

Need guidance/advice on implementing security in my react js app. I have a spring boot backend (monolitihic) application. It uses Spring security with Jwt token to implement security. When a user logs in, the app returns the Access and Refresh token in cookie. In the react app, i have created a PrivateRoute component to validate if the user is authenticated before loading protected routes. But in the component I am not able to figure out how do i validate if the user is actually authenticated. Do I just check if the browser has the cookie or not or should i send the cookie back to server to validate if token is valid or not? Also, If there is a better way of implementing security in frontend please advise
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server