Implementing /authorize redirect (default login route)

I use Auth0 to handle auth for my Vue SPA. I use authguard on the parent route ‘/’ so to do anything you have to go through the authorization flow. It’s pretty much implemented as described here

I am trying to implement a /login route that redirects to my tenant’s /authorize endpoint. This is to 1. make sure things work properly in general and 2. Implement a redirect with screen_hint=signup to take users directly to sign up.

I’d like to keep things simple as possible without dealing with nonces etc, leaving all that to the Auth0 package as much as I can. I just want to create a /login route that redirects to default login and a /signup route that redirects to the default login but with ?screen_hint=signup.

I have gone down the route of calling this.$auth.loginWithRedirect() inside a component at /login whilst watching for auth to finish loading.

Passing screen_hint: ‘signup’ to loginWithRedirect() got me to the sign-up page.

1 Like