Astro to Spring BFF to Auth0 to Spring BFF to Angular - how to prevent browser back navigation to Auth0 - Stack Overflow

admin2025-04-29  3

Is there a way of preventing the browser from going back to the Auth0 login page, in my login flow?

Right now the flow is like as follows:

  • Astro page -> Spring BFF Authorization endpoint
  • Spring BFF -> Auth0 login page
  • Auth0 login page -> Spring BFF callback endpoint (assuming successful login at Auth0)
  • Spring BFF does token exchange with Auth0 (behind the scenes)
  • Spring BFF -> redirects to Angular page (assuming token exchange went well)

Right now when on the Angular page I can see in the browser history

  • history 1 -> Auth0 (where I entered the login credentials)
  • history 2 -> Astro (the page that had the login button)

But when I navigate back to the Auth0 page, I see:

It's not a great user experience. Is there anyway of preventing Auth0 from appearing in the navigation history?

转载请注明原文地址:http://anycun.com/QandA/1745942144a91436.html