codalware-auth
Version:
Complete authentication system with enterprise security, attack protection, team workspaces, waitlist, billing, UI components, 2FA, and account recovery - production-ready in 5 minutes. Enhanced CLI with verification, rollback, and App Router scaffolding.
100 lines (88 loc) • 2.05 kB
text/typescript
/**
* AuthCore Validation
*
* Comprehensive validation schemas using Zod for type-safe validation
* across authentication, user management, and security features.
*
* @example
* ```typescript
* import { loginSchema, validateData } from '@/lib/validation';
*
* const result = validateData(loginSchema, {
* email: 'user@example.com',
* password: 'SecurePass123!'
* });
*
* if (result.success) {
* console.log('Valid login data:', result.data);
* } else {
* console.error('Validation errors:', result.errors);
* }
* ```
*/
// Export all schemas
export {
// Authentication
emailSchema,
passwordSchema,
loginSchema,
registerSchema,
passwordResetRequestSchema,
passwordResetSchema,
passwordChangeSchema,
emailVerificationSchema,
// Two-Factor Authentication
totpCodeSchema,
twoFactorSetupSchema,
twoFactorVerificationSchema,
backupCodeSchema,
// Tenant/Organization
domainSchema,
subdomainSchema,
createTenantSchema,
updateTenantSchema,
// User Management
userRoleSchema,
userStatusSchema,
updateProfileSchema,
inviteUserSchema,
// Security Settings
accountLockoutSchema,
emailRestrictionSchema,
securitySettingsSchema,
// Waitlist
waitlistSchema,
// Audit Logs
auditActionSchema,
// Pagination
paginationSchema,
// Webhooks
webhookEventSchema,
webhookConfigSchema,
// Helper Functions
validateData,
validateDataAsync,
} from './schemas';
// Export types
export type {
LoginInput,
RegisterInput,
PasswordResetRequestInput,
PasswordResetInput,
PasswordChangeInput,
EmailVerificationInput,
TwoFactorSetupInput,
TwoFactorVerificationInput,
CreateTenantInput,
UpdateTenantInput,
UpdateProfileInput,
InviteUserInput,
AccountLockoutSettings,
EmailRestrictionSettings,
SecuritySettingsInput,
WaitlistInput,
AuditAction,
PaginationInput,
WebhookEvent,
WebhookConfig,
} from './schemas';