An open API service indexing awesome lists of open source software.

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.

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.

![Image](./public/authjs-template.png)

## 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


Open in IDX



Stars
Forks
Issues

Made with ❤️ by Vivek Patel