I’m experiencing a weird issue related to login/logout in my application. I’m working on an application built on NextJS using @auth0/nextjs-auth0. The issue is this, the user has to follow a series of steps and in a certain step an auth0 user is created (we use auth0 api sending email and password) after user is created then we ask them to login using their email and password (just redirecting to api/auth/login) after de login we redirect to a page where we detect user’s id and use user’s data to continue the register, the problem comes when we try a new register after the first one, on the first page of the register we implemented an automatic logout (calling api/aputh/logout), the logout happens correctly since after visiting the first page and then going to api/auth/me I can see there is no user logged in, however when the register goes to the point where the new user is created and redirects to api/auth/login, I don’t see the auth0 login form, it kind of makes an automatic login with the first created user, seems like a cookies issue but I dont know how to effectvely logout a user then
1 Like
Hi,
It may be that you are facing this problem because of the persistent session management settings in Auth0. You could adjust the session management settings in your Auth0 Dashboard to a non-persistent mode or short session timeouts.
BUT this may not be practical if you need the application sessions to persist after closing the browser