Introduction

Welcome to the Next.js Authentication Template documentation. This template provides a complete authentication solution with multiple providers, internationalization, and a modern UI.

Screens Overview

The template includes the following screens for authentication and user management:

Authentication Screens

ScreenRouteComponentDescription
Login/loginLoginFormEmail/password login with social providers
Register/registerRegisterFormUser registration with validation
Forgot Password/forgot-passwordForgotPasswordFormSend password reset email
Reset Password/reset-passwordResetPasswordFormSet new password with token
OTP Verification/otpOtpForm6-digit code verification with 60s countdown

Protected Screens

ScreenRouteDescriptionAuth Required
Dashboard/dashboardMain dashboard after loginYes

Auth Components

Reusable components available in the auth feature:

Form Components

ComponentPathDescription
LoginFormfeatures/auth/components/login-form.tsxEmail/password form with social login buttons
RegisterFormfeatures/auth/components/register-form.tsxRegistration form with password validation
ForgotPasswordFormfeatures/auth/components/forgot-password-form.tsxEmail input to request password reset
ResetPasswordFormfeatures/auth/components/reset-password-form.tsxNew password form with confirmation
OtpFormfeatures/auth/components/otp-form.tsx6-digit OTP input with countdown timer

Social Login Components

ComponentProviderProps
GoogleLoginButtonGoogle OAuthmode, callbackUrl, disabled, iconOnly, className
FacebookLoginButtonFacebook OAuthmode, callbackUrl, disabled, iconOnly, className
InstagramLoginButtonInstagram OAuthmode, callbackUrl, disabled, iconOnly, className
LineLoginButtonLINE OAuthmode, callbackUrl, disabled, iconOnly, className
SocialLoginDivider-(no props) - Displays "or continue with"

Utility Components

ComponentDescriptionProps
UserButtonDisplays user info or login link(no props)
LogoutButtonSign out button with loading statevariant, size, showIcon, className

Features

  • Multiple Auth Providers - Google, Facebook, Instagram, LINE, and Credentials
  • Internationalization - Built-in support for English and Japanese
  • Modern UI - Built with Shadcn UI and Tailwind CSS
  • Form Validation - Zod schemas with React Hook Form
  • Type Safety - Full TypeScript support
  • Feature-based Architecture - Organized and scalable code structure

Next Steps

Ready to get started? Follow these guides: