Suppose that there are 5 minutes left for the session to expire when user enters the website.Every action that user will make after 5 minutes will be rejected by server if it requires you to login and naturally have a session.
Isnt it a bad experience for users that they think they logged in 5 minutes ago but now the actions like liking,commenting,creating is rejected because you now have no session.
Is there a way to solve this or do i have to just throw the user back into the login page again?
I use a session based auth system where user logs in and has a cookie in his browser related to the session.I am using express with node js so it would be awesome if you want to send a solution in code with node&express
Tunahan Keklik is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.