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

https://github.com/taurusilver7/next-auth

A custom Next-Authentication V.5.0 with Typescript & Prisma + Postgresql
https://github.com/taurusilver7/next-auth

Last synced: 11 months ago
JSON representation

A custom Next-Authentication V.5.0 with Typescript & Prisma + Postgresql

Awesome Lists containing this project

README

          

# Next-Auth V.5

> A Custom Authentication Service, built by Next-Auth, Typescript, TailwindCSS, Prisma & Neon Postgresql Database.

![Next-Auth](https://i.ibb.co/M2fsvMq/next-auth.jpg)

## Key Features

- 🔐 Next.js 14 with Next-Auth v5 & server actions
- 🔑 Credentials Provider& OAuth Provider (Social login with Google & GitHub)
- 🔒 Email verification & Forgot password functionality
- 📱 Two factor verification (2FA)
- 👥 User roles (Admin & User)
- 🔓 Login component (Opens in redirect or modal) & Register component.
- ✅ Forgot password, email-verification component
- 🔍 Exploring next.js middleware, next-auth sessions & next-auth callbacks.
- 👤 useCurrentUser & useRole hooks.
- 🧑 currentUser & currentRole utilities.
- 🚧 Render content for admins using RoleGate component
- 🛡️ Protect API Routes & Server Actions for admins only.
- 📧 Change email with new verification in Settings
- 🔑 Change password with old password confirmation in Settings
- 🔔 Enable/disable two-factor auth in Settings.
- 🔄 Change user role in Settings page (for development only)

## Availabel Scripts

First, run the development server:

```bash
npx create-next-app@latest --typescript --tailwind --esling
# or
npm run dev
# or
yarn dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

Add [shadcn-ui](https://ui.shadcn.com/docs/installation/next), a reusable component library for quick & crisp UI components.

```bash
npx shacn-ui@latest init
# and
npx shadcn-ui@latest add
```

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.