---
title: "Discussion on \"3 Simple Steps To Setup Authentication in Next.js\" | Hashnode"
description: "Discussion on \"3 Simple Steps To Setup Authentication in Next.js\". In this tutorial, we will see how to easily set up authentication for Next.js apps.\nStep 1. Create Next.js application\nyarn create next-app next-auth\n# npx create-next-app next-auth\n\nThis will create a new Next.js application. You can remove unnecess..."
url: "https://hashnode.com/posts/3-simple-steps-to-setup-authentication-in-nextjs/5fa3ad7e3e634314b5178a93"
---

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

Discussion

# [3 Simple Steps To Setup Authentication in Next.js](https://blog.bhanuteja.dev/3-simple-steps-to-setup-authentication-in-nextjs?utm_source=hashnode&utm_medium=feed)

In this tutorial, we will see how to easily set up authentication for Next.js apps. Step 1. Create Next.js application yarn create next-app next-auth # npx create-next-app next-auth This will create a new Next.js application. You can remove unnecess...

Nov 5, 2020 · 3 min read · blog.bhanuteja.dev  
Updated Nov 1, 2022  
Read the article

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

## Written by

[Bhanu Teja Pachipulusu](https://hashnode.com/@pbteja1998)

@pbteja1998 · India

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

Full-Stack Developer & Entrepreneur

Full-Stack Developer, Entrepreneur and Co-Founder of Coderplex. Building https://coderplex.in Checkout my portfolio at https://bhanuteja.dev

## Responses 2

Markdown supported · ⌘↵ to post

[NY](https://hashnode.com/@ny)

[Nov 28, 2020](https://hashnode.com/posts/3-simple-steps-to-setup-authentication-in-nextjs/5fa3ad7e3e634314b5178a93/comment/5fc209c9f1207e5b3cdf0ae8)

Thanks for this! Just wondering, what would the callback URL be when deployed to production? Replacing "localhost" with the app url doesn't seem to work...

[Bhanu Teja Pachipulusu](https://hashnode.com/@pbteja1998)

[Nov 28, 2020](https://hashnode.com/posts/3-simple-steps-to-setup-authentication-in-nextjs/5fa3ad7e3e634314b5178a93/comment/5fc209c9f1207e5b3cdf0ae8#reply-5fc2261129ee3663480c9b47)

Check whether you have http or https. Also check if you have set NEXTAUTH\_URL to the url of the application url or not.

[next-auth.js.org/getting-started/example](https://next-auth.js.org/getting-started/example#deploying-to-production)

[Bhanu Teja Pachipulusu](https://hashnode.com/@pbteja1998)

[Nov 28, 2020](https://hashnode.com/posts/3-simple-steps-to-setup-authentication-in-nextjs/5fa3ad7e3e634314b5178a93/comment/5fc209c9f1207e5b3cdf0ae8#reply-5fc2290c55b779631e1acc2f)

Check this blog post where I have shown deploying an application which also has NextAuth (GitHub Auth and Password-less Auth)

[blog.bhanuteja.dev/nextjs-starter-with-authentica…](https://blog.bhanuteja.dev/nextjs-starter-with-authentication-react-17-typescript-tailwind-css-2-eslint)

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

[Nov 5, 2020](https://hashnode.com/posts/3-simple-steps-to-setup-authentication-in-nextjs/5fa3ad7e3e634314b5178a93/comment/5fa3f1a447631a19e811f007)

Super useful! Thanks Bhanu :)
