https://github.com/patelvivekdev/authjs-template
A template repo for starting authentication in your upcoming Next.js application. Used Drizzle, Auth.js(Next-Auth), Turso.
https://github.com/patelvivekdev/authjs-template
2fa acertinityui authjs authjs-template drizzle-orm libsql magicui next-auth nextjs14 passkeys react19 turso two-factor-authentication webauthn
Last synced: about 2 months ago
JSON representation
A template repo for starting authentication in your upcoming Next.js application. Used Drizzle, Auth.js(Next-Auth), Turso.
- Host: GitHub
- URL: https://github.com/patelvivekdev/authjs-template
- Owner: patelvivekdev
- License: mit
- Created: 2024-05-24T01:20:42.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-29T20:12:04.000Z (4 months ago)
- Last Synced: 2025-04-13T04:46:04.296Z (about 2 months ago)
- Topics: 2fa, acertinityui, authjs, authjs-template, drizzle-orm, libsql, magicui, next-auth, nextjs14, passkeys, react19, turso, two-factor-authentication, webauthn
- Language: TypeScript
- Homepage: https://authjs-template.patelvivek.dev
- Size: 2.65 MB
- Stars: 53
- Watchers: 1
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AuthJs Template
> Updated to nextjs15 and react19.
A template repo for starting authentication in your upcoming Next.js application. Used Drizzle, Auth.js(Next-Auth), Turso.

## What's inside?
- How to setup Credentials login with username/password in NextJs.
- How to setup Two factor in NextJs.
- How to setup Passkey in NextJs.
- How to setup Oauth Login in NextJs.
- How to Link accounts in NextJs.All of these with Next-auth(AuthJs v5) and Nextjs 15 App router
---
## Basic
- [x] Register | Public
- [x] Login | Public
- [x] Credentials Login | Public
- [x] Social Login(Google, Github) | Public
- [x] Email Verification | Public## Password Reset
- [x] Password Reset (email link) | Public
- [x] change password(Email user can change password) | Protected
- [x] Add Password(Oauth user can set Password.) | Protected## Profile Update
- [ ] Profile Update | Protected
- [ ] Profile Picture Update | Protected
- [ ] Email Update | Protected
- [ ] Username Update | Protected
- [x] Delete Account | Protected## Link Accounts
- [x] Account linking | Protected
- [x] Account Unlinking | Protected## Two Factor Authentication
- [x] Two Factor - Register with QRCode | Protected
- [x] Two Factor - Verify after register | Protected
- [x] Two Factor - Used After login(Oauth as well as Credentials) | Public
- [x] Add Backup options(Verify using email)
- [x] Disable Two Factor.## Passkey/ Passwordless Login
- [x] Passkey/ Passwordless Login
## Role Based Access
- [x] Role Based Access | Protected
> Here, I used my domain to select the admin user. After that, the admin can add another admin
## User Management (Admin)
- [x] Admin Dashboard
- [ ] Permission## Database sessions
- [x] Database sessions checkout [db-session](https://github.com/patelvivekdev/drizzle-next-auth-turso/tree/db-session)
## Emails
- [ ] Send an email for every account change event and store the history.
## Links
- [Live Link JWT Sessions](https://authjs-template.patelvivek.dev)
- [Live Link DB Sessions](https://authjs-template-db-sessions.patelvivek.dev)- [AuthJS](https://authjs.dev)
- [Drizzle](https://drizzle.team)
- [Turso](https://turso.dev)
- [NextJs](https://nextjs.org)
- [Magic Ui](https://magicui.design)
- [patelvivek.dev](https://patelvivek.dev/projects/authjs-template-for-nextjs-developers)## Open In IDX
![]()
![]()
![]()
Made with ❤️ by Vivek Patel