nextjs-nextauth-tut
nextjs-nextauth-tut copied to clipboard
How to add authentication to Nextjs with NextAuth. App Router vs Pages Router
This project results from a tutorial I created to show how to create authentication in Nextjs using NextAuth.
It differentiates between the app and pages routing patterns.
Find the tutorial here
Dependencies
Installation
- Clone this repo
https://github.com/EBEREGIT/nextjs-nextauth-tut - Navigate into the repo
cd nextjs-nextauth-tut - Navigate into any of the folders
cd <folder_name> - Install the dependencies
npm install - Start the local server
npm run dev
That will open the project on your default browser: http://localhost:3000/.
- Click on http://localhost:3000/api/auth/signin and play around with the authentication form.
