User GuideAuthentication
Email Password Authentication
Configure email verification and email sending
Email password authentication is enabled by default.
Core Features
- ✅ User registration with email verification
- ✅ User login with "remember me" feature
- ✅ Password reset functionality
- ✅ Account recovery options
- ✅ Secure session management
Email Verification Configuration
Configure in config/auth.ts:
export const authConfig = {
requireEmailVerification: true,
}Strongly recommended to set to true in production to prevent spam and abuse.
Email Service Configuration
Resend Configuration
- Visit Resend to register
- Verify your sending domain
- Get API Key
RESEND_API_KEY="re_123456789_abcdefghijklmnop"
EMAIL_DEFAULT_FROM="noreply@tinyship.cn"Modify Configuration File
// config/email.ts
export const emailConfig = {
defaultProvider: 'resend',
}Development Environment Tips
In development, verification links are automatically stored in context:
if (process.env.NODE_ENV === 'development') {
(request as any).context.verificationUrl = url;
console.log('Verification URL:', url);
}Check the Network panel to get verification links.