I am building and react express app, I am not using server side rendering, where I am facing problem in session management in the client side
So problem. Is like this
I have express route /, /login, /logout, /dashboard
And I also have the same routing in react using react router dom
I used express-session to set the useremail as a session variable in /login route of express app
Then I redirect user to /dashboard . Before redirect user to /dashboard I put authentication code where I check session.useremail is set or not
But when user hit /dashboard to server . Server do authentication . But if user navigate to /dashboard in react client app it just show all the dashboard