An open API service indexing awesome lists of open source software.

https://github.com/emanuelefavero/nextjs-app-router-authentication

This is an example of how to implement authentication with Next.js App Router using no libraries
https://github.com/emanuelefavero/nextjs-app-router-authentication

app-router authentication nextjs react

Last synced: 3 months ago
JSON representation

This is an example of how to implement authentication with Next.js App Router using no libraries

Awesome Lists containing this project

README

          

# Next.js App Router Authentication

This is a simple example of how to implement a simple authentication with no libraries in Next.js App Router

> Note: This example does not use a database to store user credentials, in a real application you should use a database and modify the expiration time in `lib.ts` (see comment)
>
> Note: This project is inspired by Lee Robinson repo: [https://github.com/balazsorban44/auth-poc-next](https://github.com/balazsorban44/auth-poc-next)

#### Screenshot

screenshot

## Getting Started

Clone the repository, then:

```bash
npm i
npm run dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result

## Resources

- [Next.js Authentication](https://nextjs.org/docs/app/building-your-application/authentication)
- [Lucia Auth](https://lucia-auth.com/)
- [NextAuth](https://next-auth.js.org/)

## License

- [MIT](LICENSE.md)