Auth0 Home Blog Docs

Next.js Authentication with Auth0 — The Ultimate Guide

Learn how (and where) to authenticate your user in the different deployment modes that exist for Next.js.

Read on :zap:

Brought to you by @sandrino-a0 :man_technologist:t2:

2 Likes

We’ve had such amazing response to the blog post! If you’re using Auth0 to build Next.js applications with any of the deployment models documented in this post we would love to hear your feedback and comments!

1 Like

Great write-up. I’ve been tooling around with a lot of different methods, mostly the custom server, but would like to get it working serverless as described in this post. Now, while I love Auth0 and use it in pet projects, I have a requirement in a professional project to use a private OpenID Connect provider. After looking the source over a little bit, the @auth0/nextjs-auth0 library looks like it could theoretically be used for any OpenID Connect provider by providing the issuer URL, not requiring Auth0 specifically. Is that the case?

Thanks for this! I’m a bit new to auth0, does nextjs-auth0 only work with universal login? Are there examples for how to implement this using custom login/signup/password reset pages built on NextJS?

Great! I’ve been looking for a solution to run the auth server-side with next and this works well.

It looks like on the serverless example you are missing the callback handler example.

1 Like

Glad you liked it @feverteam!

Thanks so much for the write up and work on nextjs-auth0 SDK, it’s been something really important for us at our company!

My team and I are still currently trying to figure out the best way to handle the following:

  1. Using the serverless model (following the NextJS example), what are your suggestions in handling re-auth / refresh?
  2. What’s the suggested pattern for integrating this with usage of Apollo’s graphql client?

Hey there!

Let me ping article’s author @sandrino-a0 to check and address your hurdles!

1 Like