I am using Universal Login with auth0/nextjs on a few applications. So I sign in using one application at https://appone.com/api/auth/login.
Then go to app two where I am not signed in. After going to http://apptwo.com/api/auth/login, I am logged in using SSO without having to re-enter credentials. This is great.
My issue is if I don’t want to require authentication on every page to trigger a route to /api/auth/login. I’d like to be able to check if the user signed in on another application, if so, log them in without any other interaction, otherwise allow the user to browse.
I think I just don’t understand the authentication flow well enough to figure this out myself. I’ve tried calling an api from the client that uses the
handleLogin method with
prompt=none as an authorization parameter. I get an error back that says I still need to log in even if I’ve logged in on another app.
I just need a bit of guidance with this library. Main goal is to allow a user who logged in from another nextjs app using Universal Login to be auto-logged in, otherwise allow them to browse without any auth required. Any help is appreciated. thanks.