Hi Auth0 Community,
I’m hoping someone can help me with an issue I’m facing in my Next.js application using Auth0 for authentication. Here’s the problem:
When a user logs out of our app and then tries to log in again, they’re not being taken to the Auth0 Universal Login portal. Instead, they’re automatically logged back into their previous account. This is causing confusion for our users and potential security concerns.
Here’s what’s happening:
- User logs into the app successfully
- User logs out
- User clicks “Login” again
- Instead of seeing the Auth0 login page, they’re instantly logged back in
What we’ve tried:
- Checked our logout implementation
- Reviewed Auth0 documentation for Next.js integration
- Searched through community posts for similar issues
What we expect: After logout, users should always be directed to the Auth0 Universal Login page when they attempt to log in again.
Some questions:
- Is this a known issue with Auth0 and Next.js?
- Are there specific configuration settings we might be missing?
- Could this be related to browser caching or cookie management?
- Are there best practices for handling logout in Next.js with Auth0 that we’re overlooking?
I’d really appreciate any insights, suggestions, or solutions you might have. If you need any more information about our setup or implementation, please let me know.
Thanks in advance for your help!