How to redirect to signup univesal login in nextjs?

Hey guys,

So I’m using auth0 to handle user login for an application with a nextjs frontend, which consumes an express API on the backend.

Everything works fine as far as the basis go, I used the following article to get the next.js side done:

https://auth0.com/blog/introducing-the-auth0-next-js-sdk/

Here’s my question: how do I lead users to the signup page directly? I’ve seen documentation to redirect to the signup page as follows:

You can make users land directly on the Signup page instead of the Login page by specifying the screen_hint=signup parameter when redirecting to /authorize .

Here’s the problem: I don’t see where that /authorize route comes from. It’s not mentioned anywhere in the next.js SDK. My users are lead to the login page by clicking on a link with the href: /api/auth/login.

I tried /api/auth/login?screen_hint=signup, but that doesn’t work, I tried /api/auth/signup, but that doesn’t work either.

How can I lead my users to the signup page using the next.js SDK?

Thank you.

2 Likes

2 posts were merged into an existing topic: Introducing Auth0’s Next.js SDK