Hi, I need advice on maintaining a session despite a user refreshing the browser. I am migrating my codebase to auth0 from a custom authentication service. I’m struggling to figure out what to extract and how to store it on the browser so that when I refresh the browser the access token/id can be retrieved to keep a user logged in. The example by Auth0 loses state and I keep having to log in to resume interacting with my app. Please help.
Hi @thatguycodes,
Welcome to the Auth0 Community!
Firstly, you can maintain a session by configuring the session lifetime settings.
By default, users have an Inactivity Timeout of 3 days and Requires log in after 30 days.
If you need to maintain this session without prompting the user for credentials, you could Configure Silent Authentication or Configure Refresh Token Rotation.
Please let me know if you have any questions.
Thanks,
Rueben
I have set this up correctly. However, on the Angular app, which the client app that is integrated with Auth0. I seem to get logged out each time I refresh the browser. I was wondering if you could point me to the right direction on how to make sure that when a token is refreshed, I"m not logged out in the process.
HI @thatguycodes,
Thanks for following up.
Could you please capture the login events in a HAR file and send them to me in a direct message to look into this further?
Thanks,
Rueben
After restarting my laptop the issues just resolved themselves. So I will blame it on cache for now. Thank you for your time. When I run into other issues I will open a new topic if the topic doesn’t exist.
Hi @thatguycodes,
Thanks for following up, and I’m glad it worked after resetting your machine.
It may be possible that something was cached and behaving incorrectly.
Please feel free to reach out if you have any additional questions. We are here to help!
Thanks,
Rueben
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.