UNPKG

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.

85 lines (73 loc) 2.59 kB
// Public package entrypoint - minimal, essential exports only // Main auth component export { default as AuthForm } from './components/AuthForm'; export type { AuthFormProps, AuthFormSocialProvider } from './components/AuthForm'; // Supporting components export { default as AuthModal } from './components/AuthModal'; export { default as PasswordInput } from './components/PasswordInput'; export { default as LoadingSpinner } from './components/LoadingSpinner'; export { default as withAuthentication } from './components/withAuthentication'; export { default as withAuth } from './components/withAuthentication'; // UI Components export { OtpInput } from './components/ui'; // Internationalization export { I18nProvider, useI18n, translate, registerDictionary, buildTranslator } from './i18n'; export type { Translator, TranslateValues } from './i18n'; export { default as enMessages } from '../locales/en.json'; export { default as frMessages } from '../locales/fr.json'; // Essential Hooks export { useAuth } from './hooks/useAuth'; export { useLogin } from './hooks/useLogin'; export { useRegister } from './hooks/useRegister'; export { useMagicLink } from './hooks/useMagicLink'; export { useAuthPolicy } from './hooks/useAuthPolicy'; export { useTwoFactor } from './hooks/useTwoFactor'; export { usePasswordChange } from './hooks/usePasswordChange'; // Re-export components for convenience export * from './components'; // Configuration API export { configure, getConfig, ConfigProvider, useAuthCoreConfig } from './config'; // Validation (Zod schemas) export * from './validation'; // Server types export type { AuthUser, AuthSession, LoginCredentials, RegisterData, TenantData, EmailVerificationData, PasswordResetData, TwoFactorSetup as TwoFactorSetupData, TwoFactorVerification, ApprovalRequest, TenantSettings, AuthError, ApiResponse, TenantResolution, UserWithTenant, PendingUser, } from './types/auth'; // Default export aggregate import { configure, getConfig, ConfigProvider, useAuthCoreConfig } from './config'; import withAuth from './components/withAuthentication'; import * as Components from './components'; import { I18nProvider, useI18n, translate, registerDictionary, buildTranslator } from './i18n'; import enMessages from '../locales/en.json'; import frMessages from '../locales/fr.json'; const AuthCore: Record<string, unknown> = { ...Components, withAuth, configure, getConfig, ConfigProvider, useAuthCoreConfig, I18nProvider, useI18n, translate, registerDictionary, buildTranslator, enMessages, frMessages, }; export default AuthCore as typeof AuthCore;