Skip to content

Nextjs 14 w/ Next-Auth v5, Prisma, zod, react-hook-form | Forgot password | email verification | 2FA | User Roles | Rate Limiting

Notifications You must be signed in to change notification settings

zenWai/nextjs14-next-authv5-app-router

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Next.js NextAuth v5

Tests View Test Report

Key Features:

  • πŸ” Next-auth v5 (Auth.js)
  • πŸš€ Next.js 14 with server actions
  • πŸ”‘ Credentials Provider
  • πŸͺ„ Magic-Link Authentication
  • 🌐 OAuth Provider (Social login with Google & GitHub)
  • πŸ›‘ Registration Restriction, maximum of 2 accounts per user
  • πŸ”’ Forgot password functionality
  • βœ‰οΈ Email verification
  • πŸ“± Two factor verification (2FA)
  • πŸ‘₯ User roles
  • πŸ”“ Login component
  • πŸ“ Register component
  • πŸ€” Forgot password component
  • βœ… Verification component
  • ⚠️ Error component
  • 🚧 Role Gate
  • πŸ‘‘ Render content for admins using RoleGate component
  • πŸ“ˆ next-auth session
  • πŸ”„ next-auth callbacks
  • πŸ’Ž CustomAdapter extends PrismaAdapter
  • πŸ–₯️ Example with server component
  • πŸ’» Example with client component
  • πŸ›‘οΈ Protect API Routes for admins only
  • πŸ” Protect Server Actions for admins only
  • πŸ“§ Change email with new verification in Settings page
  • πŸ”‘ Change password with old password confirmation in Settings page
  • πŸ”” Enable/disable two-factor auth in Settings page
  • πŸ”„ Direct Change user role in Settings page (for dev&testing purposes)