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
- Host: GitHub
- URL: https://github.com/emanuelefavero/nextjs-app-router-authentication
- Owner: emanuelefavero
- License: mit
- Created: 2024-04-11T17:23:00.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-12T15:50:06.000Z (about 2 years ago)
- Last Synced: 2025-03-29T16:13:06.111Z (over 1 year ago)
- Topics: app-router, authentication, nextjs, react
- Language: TypeScript
- Homepage:
- Size: 113 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
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

## 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)