---
title: "Discussion on \"Let's build a serverless Next.js app with Auth0 for authenticating users\" | Hashnode"
description: "Discussion on \"Let's build a serverless Next.js app with Auth0 for authenticating users\". ⚠\nThis article was written in 2021, some of the content may be outdated when you read it.\n\n\nLet's explore how we can integrate user authentication in a serverless Next.js app using Auth0 in a really simple way. We will be using a package called @auth..."
url: "https://hashnode.com/posts/lets-build-a-serverless-nextjs-app-with-auth0-for-authenticating-users/60b9da75d7e1e779f671cbca"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Let's build a serverless Next.js app with Auth0 for authenticating users](https://blog.kieranroberts.dev/lets-build-a-serverless-nextjs-app-with-auth0-for-authenticating-users?utm_source=hashnode&utm_medium=feed)

⚠ This article was written in 2021, some of the content may be outdated when you read it. Let's explore how we can integrate user authentication in a serverless Next.js app using Auth0 in a really simple way. We will be using a package called @auth...

Jun 4, 2021 · 16 min read · blog.kieranroberts.dev  
Updated Jan 21, 2025  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#nextjs](https://hashnode.com/tag/nextjs)
-   [#authentication](https://hashnode.com/tag/authentication)

## Written by

[Kieran Roberts](https://hashnode.com/@kieran6roberts)

@kieran6roberts · Galway, Ireland

  
[View profile](https://hashnode.com/@kieran6roberts)

Software Engineer | Ex Hashnode

## Responses 7

Markdown supported · ⌘↵ to post

[Piyush Garg](https://hashnode.com/@piyushgarg)

[Aug 14, 2021](https://hashnode.com/posts/lets-build-a-serverless-nextjs-app-with-auth0-for-authenticating-users/60b9da75d7e1e779f671cbca/comment/61176d7bf6ebde51f64fa1bb)

Hey there, Nice Post. I made an npm package for handling AWS Lambda responses. Do checkout 😎

AWS-TS This package lets you handle and send responses from AWS lambda with ease. You have the ability to send various types of responses such as JSON or Plain Text without worrying about headers and status codes. You can also enable or disable cors for all or specific responses or set custom headers.

🚀 [https://www.npmjs.com/package/aws-ts](https://www.npmjs.com/package/aws-ts)

[Toni Tesori](https://hashnode.com/@ttesori)

[Jun 7, 2021](https://hashnode.com/posts/lets-build-a-serverless-nextjs-app-with-auth0-for-authenticating-users/60b9da75d7e1e779f671cbca/comment/60be3512fffc4c13b9cd9a1b)

What a great post! I've just started learning about Next.js and was wondering how this was done - bookmarking for future reference. 👍

[Kieran Roberts](https://hashnode.com/@kieran6roberts)

[Jun 9, 2021](https://hashnode.com/posts/lets-build-a-serverless-nextjs-app-with-auth0-for-authenticating-users/60b9da75d7e1e779f671cbca/comment/60be3512fffc4c13b9cd9a1b#reply-60c05482d2660e41762e30ac)

Glad it could be useful to you, thanks [Toni Tesori](https://hashnode.com/@ttesori)

[Sag Dev](https://hashnode.com/@sagdev)

[Jun 6, 2021](https://hashnode.com/posts/lets-build-a-serverless-nextjs-app-with-auth0-for-authenticating-users/60b9da75d7e1e779f671cbca/comment/60bc9862e36d51141c95c41a)

Great post [Kieran Roberts](https://hashnode.com/@kieran6roberts), really detailed. I am working on a personal project and struggled a bit with the authentication and I found a lot of helpful details on this post 🙏

[Kieran Roberts](https://hashnode.com/@kieran6roberts)

[Jun 9, 2021](https://hashnode.com/posts/lets-build-a-serverless-nextjs-app-with-auth0-for-authenticating-users/60b9da75d7e1e779f671cbca/comment/60bc9862e36d51141c95c41a#reply-60c0544fd2660e41762e30a7)

Thanks! Good luck with your project [Sag Dev](https://hashnode.com/@sagdev).

[Rifat Alam](https://hashnode.com/@rifatalam)

[Jun 5, 2021](https://hashnode.com/posts/lets-build-a-serverless-nextjs-app-with-auth0-for-authenticating-users/60b9da75d7e1e779f671cbca/comment/60bbe71ae36d51141c95bb91)

When I used Next.js for the first time, I immediately fell in love with it. Great article!

[Victoria Lo](https://hashnode.com/@victoria)

[Jun 5, 2021](https://hashnode.com/posts/lets-build-a-serverless-nextjs-app-with-auth0-for-authenticating-users/60b9da75d7e1e779f671cbca/comment/60bb8d10e36d51141c95b09e)

So comprehensive and detailed! Loved it and bookmarked for future reference 😊😊

[Kieran Roberts](https://hashnode.com/@kieran6roberts)

[Jun 5, 2021](https://hashnode.com/posts/lets-build-a-serverless-nextjs-app-with-auth0-for-authenticating-users/60b9da75d7e1e779f671cbca/comment/60bb8d10e36d51141c95b09e#reply-60bbf02ee36d51141c95bbfa)

Thank you [Victoria Lo](https://hashnode.com/@victoria), it took a lot of time to get it right but I'm happy with the result!

[Savio Martin](https://hashnode.com/@saviomartin)

[Jun 5, 2021](https://hashnode.com/posts/lets-build-a-serverless-nextjs-app-with-auth0-for-authenticating-users/60b9da75d7e1e779f671cbca/comment/60bb7588e36d51141c95ae47)

This looks cool! Thanks for the article [Kieran Roberts](https://hashnode.com/@kieran6roberts)!

[Kieran Roberts](https://hashnode.com/@kieran6roberts)

[Jun 5, 2021](https://hashnode.com/posts/lets-build-a-serverless-nextjs-app-with-auth0-for-authenticating-users/60b9da75d7e1e779f671cbca/comment/60bb7588e36d51141c95ae47#reply-60bbef40fffc4c13b9cd6cfb)

Glad you liked it [Savio Martin](https://hashnode.com/@saviomartin) 🙏

[Andrew Baisden](https://hashnode.com/@andrewbaisden)

[Jun 4, 2021](https://hashnode.com/posts/lets-build-a-serverless-nextjs-app-with-auth0-for-authenticating-users/60b9da75d7e1e779f671cbca/comment/60ba10d182d26410fbbf7aef)

This is great [Kieran Roberts](https://hashnode.com/@kieran6roberts)! A nice run through for setting up authentication in a Next.js app. I am working with some authentication in an app at the moment so this article was perfect timing.

[Kieran Roberts](https://hashnode.com/@kieran6roberts)

[Jun 4, 2021](https://hashnode.com/posts/lets-build-a-serverless-nextjs-app-with-auth0-for-authenticating-users/60b9da75d7e1e779f671cbca/comment/60ba10d182d26410fbbf7aef#reply-60ba22764f018f10d6234dac)

Glad I could help [Andrew Baisden](https://hashnode.com/@andrewbaisden). What kind of app are you working on?

[Andrew Baisden](https://hashnode.com/@andrewbaisden)

[Jun 4, 2021](https://hashnode.com/posts/lets-build-a-serverless-nextjs-app-with-auth0-for-authenticating-users/60b9da75d7e1e779f671cbca/comment/60ba10d182d26410fbbf7aef#reply-60ba29f14f018f10d6234ec1)

[Kieran Roberts](https://hashnode.com/@kieran6roberts) it is a user dashboard that has profiles and lets users sign up. It is for a technical test that I am working on.
