Auth0 Universal Login Bypass in Next.js App: Users Auto-Login After Logout

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:

  1. User logs into the app successfully
  2. User logs out
  3. User clicks “Login” again
  4. 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:

  1. Is this a known issue with Auth0 and Next.js?
  2. Are there specific configuration settings we might be missing?
  3. Could this be related to browser caching or cookie management?
  4. 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!