Skip to content

A template repo for starting authentication in your upcoming Next.js application. Used Drizzle, Auth.js(Next-Auth), Turso.

License

Notifications You must be signed in to change notification settings

patelvivekdev/AuthJs-Template

Repository files navigation

AuthJs Template

A template repo for starting authentication in your upcoming Next.js application. Used Drizzle, Auth.js(Next-Auth), Turso.

Image

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 these with Next-auth(AuthJs v5).


Basic

  • Register | Public
  • Login | Public
  • Credentials Login | Public
  • Social Login(Google, Github) | Public
  • Email Verification | Public

Password Reset

  • Password Reset (email link) | Public
  • change password(Email user can change password) | Protected
  • Add Password(Oauth user can set Password.) | Protected

Profile Update

  • Profile Update | Protected
  • Profile Picture Update | Protected
  • Email Update | Protected
  • Username Update | Protected
  • Delete Account | Protected

Link Accounts

  • Account linking | Protected
  • Account Unlinking | Protected

Two Factor Authentication

  • 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

  • Passkey/ Passwordless Login

Role Based Access

  • Role Based Access | Protected

Here I used my domain to select admin user. After that admin can another admin

User Management (Admin)

  • Admin Dashboard
  • Permission

Database sessions

Emails

  • Send email for every account change event and store the history.

Links

Open In IDX

Open in IDX
Stars Forks Issues
Made with ❤️ by Vivek Patel

Releases

No releases published

Packages

No packages published

Languages