Updated to nextjs15 and react19.
A template repo for starting authentication in your upcoming Next.js application. Used Drizzle, Auth.js(Next-Auth), Turso.
- 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
- Register | Public
- Login | Public
- Credentials Login | Public
- Social Login(Google, Github) | Public
- Email Verification | Public
- Password Reset (email link) | Public
- change password(Email user can change password) | Protected
- Add Password(Oauth user can set Password.) | Protected
- Profile Update | Protected
- Profile Picture Update | Protected
- Email Update | Protected
- Username Update | Protected
- Delete Account | Protected
- Account linking | Protected
- Account Unlinking | Protected
- Two Factor - Register with QRCode | Protected
- Two Factor - Verify after register | Protected
- Two Factor - Used After login(Oauth as well as Credentials) | Public
- Add Backup options(Verify using email)
- Disable Two Factor.
- Passkey/ Passwordless Login
- Role Based Access | Protected
Here, I used my domain to select the admin user. After that, the admin can add another admin
- Admin Dashboard
- Permission
- Database sessions checkout db-session
- Send an email for every account change event and store the history.
-
[Live Link DB Sessions](https://authjs-template-db-sessions.patelvivek.devi