Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sarmad426/nextjs-auth-v5
Next.js app authentication with auth-v5.
https://github.com/sarmad426/nextjs-auth-v5
authjs nextjs shadcn-ui typescript
Last synced: 5 days ago
JSON representation
Next.js app authentication with auth-v5.
- Host: GitHub
- URL: https://github.com/sarmad426/nextjs-auth-v5
- Owner: Sarmad426
- Created: 2024-01-23T10:06:13.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-03-20T14:30:43.000Z (8 months ago)
- Last Synced: 2024-03-20T15:53:36.475Z (8 months ago)
- Topics: authjs, nextjs, shadcn-ui, typescript
- Language: TypeScript
- Homepage:
- Size: 196 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)