Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

zenWai/nextjs14-next-authv5-app-router

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)

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /