Skip to content

Latest commit

 

History

History
104 lines (70 loc) · 2.98 KB

README.md

File metadata and controls

104 lines (70 loc) · 2.98 KB

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.

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 of these with Next-auth(AuthJs v5) and Nextjs 15 App router


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 the admin user. After that, the admin can add another admin

User Management (Admin)

  • Admin Dashboard
  • Permission

Database sessions

Emails

  • Send an 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