Introducing Auth0's Next.js SDK

Learn how to add authentication with Auth0 to your Next.js apps using our newly released nextjs-auth0 SDK.
Read more…

Brought for you by @adam.mcgrath

3 Likes

We’re happy to help if you have any questions!

1 Like

Deleted previous message due to SPAM reasons

Hi thanks for this. Looks great. Is there a recommended way to use the new SDK with Hasura?

Hey there Glen!

I guess there isn’t as it’s fairly “new” SDK but that’s a good idea! I would highly encourage you to share that in our feedback category here:

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:

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.

Hey there!

Moving your post to this thread as this one is related with the blog article you referenced.

I’m also curious how to redirect to Sign Up page directly instead of the login page. Any ideas @konrad.sopala?

Thanks in advance!