filmov
tv
NextJS14 authentication application using NextAuth version 5 (the lastest version)

Показать описание
Key Features:
- Credentials Provider
- OAuth Provider (Social login with Google & GitHub)
- Forgot password functionality
- Email verification
- Two factor verification (2FA)
- User roles (Admin & User)
- Login component (Opens in redirect or modal)
- Register component
- Forgot password component
- Verification component
- Error component
- Login button
- Logout button
- Role Gate
- Extending & Exploring next-auth session
- Exploring next-auth callbacks
- useCurrentUser hook
- useRole hook
- currentUser utility
- currentRole utility
- Example with server component
- Example with client component
- Render content for admins using RoleGate 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
- Change user role in Settings page (for development purposes only)