Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sarmad426/nextjs-auth-template
Next.js auth template with auth-v5.
https://github.com/sarmad426/nextjs-auth-template
auth-v5 next-auth-v5 nextjs tailwindcss typescript
Last synced: 5 days ago
JSON representation
Next.js auth template with auth-v5.
- Host: GitHub
- URL: https://github.com/sarmad426/nextjs-auth-template
- Owner: Sarmad426
- Created: 2024-02-24T10:40:05.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2024-03-29T07:28:21.000Z (8 months ago)
- Last Synced: 2024-03-30T07:47:45.678Z (8 months ago)
- Topics: auth-v5, next-auth-v5, nextjs, tailwindcss, typescript
- Language: TypeScript
- Homepage:
- Size: 296 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Authentication in Next.js
Authenticate **Next.js** app using `next-auth`.
## This Repository Covers
- Authentication
- Next.js Middleware
- User Management
- Role Management
- Sessions
- Credential Providers (Google, Github)
- Email Verification
- 2 Factor Authentication
- Forgot Password## Tech Stack
- Next.js 14 (Server Actions)
- Typescript
- Shadcn-ui
- Tailwind CSS
- Prisma
- PostgreSQL
- **Auth v5**### Other Packages
**Auth js:**
```npm install next-auth@beta```
This is the version '^5.0.0-beta.5'. It's currently in beta. Check out the
officical docs.- Adopt Prisma with Auth.js
```npm i @auth/prisma-adapter```
- Bcrypt for Password Hashing
```npm i bcryptjs @types/bcryptjs```
- Initialize `shadcn-ui`
```npx shadcn-ui@latest init```- Add the following components
```npx shadcn-ui@latest add form input button```> This will automatically add the required npm packages to use forms.
> If you want to checkout implementation of forms using shadcn-ui, checkout the
> [documentation](https://github.com/Sarmad426/Documentation/tree/master/Shadcn-zod-forms).
> if you want to install manually.```npm i zod react-hook-form@latest```
- For other Next-js installations
Check out the following resource.
[Documentation](https://github.com/Sarmad426/Documentation/tree/master/Nextjs-project-installations)
- For `Prisma`
[Documentation](https://github.com/sarmad426/Documentation/tree/master/prisma)