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 these with Next-auth(AuthJs v5).
- 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 admin user. After that admin can another admin
- Admin Dashboard
- Permission
- Database sessions checkout db-session
- Send email for every account change event and store the history.
-
[Live Link DB Sessions](https://authjs-template-db-sessions.patelvivek.devi