init: initial commit
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
42
src/index.tsx
Normal file
42
src/index.tsx
Normal file
@@ -0,0 +1,42 @@
|
||||
// PURPOSE: Arcadia-specific wiring around the @crema/auth-ui form library.
|
||||
// Each form here is a thin wrapper over the matching auth-ui form
|
||||
// (SignInForm, SignUpForm, ForgotPasswordForm, ResetPasswordForm,
|
||||
// OtpForm) that adds:
|
||||
// • the right arcadia endpoint path
|
||||
// • request body shaping (e.g. splitting `name` → first/last)
|
||||
// • response decoding (e.g. 2FA challenge branch on /auth/login)
|
||||
// • ArcadiaError → human message handling
|
||||
//
|
||||
// The visuals, validation, accessibility, and form layout all
|
||||
// come from @crema/auth-ui. If you want to restyle the auth
|
||||
// surface, do it there — these wrappers stay thin on purpose.
|
||||
// ===========================================================================
|
||||
// EXPORTS
|
||||
// LoginForm — wraps SignInForm; POSTs /api/v1/auth/login;
|
||||
// returns tokens + user, or 2FA challenge
|
||||
// SignupForm — wraps SignUpForm; POSTs /api/v1/auth/register
|
||||
// PasswordResetRequestForm — wraps ForgotPasswordForm
|
||||
// PasswordResetConfirmForm — wraps ResetPasswordForm
|
||||
// TwoFactorChallengeForm — wraps OtpForm; POSTs /api/v1/2fa/verify
|
||||
//
|
||||
// (Planned) OAuthButtons (wrap SocialButton), TwoFactorSetupForm
|
||||
// (wrap TwoFactorSetup from auth-ui's advanced surface),
|
||||
// InvitationAcceptForm.
|
||||
// ===========================================================================
|
||||
"use client";
|
||||
|
||||
export { LoginForm, type LoginFormProps, type LoginResult } from "./login-form";
|
||||
export { SignupForm, type SignupFormProps, type SignupResult } from "./signup-form";
|
||||
export {
|
||||
PasswordResetRequestForm,
|
||||
type PasswordResetRequestFormProps,
|
||||
} from "./password-reset-request-form";
|
||||
export {
|
||||
PasswordResetConfirmForm,
|
||||
type PasswordResetConfirmFormProps,
|
||||
} from "./password-reset-confirm-form";
|
||||
export {
|
||||
TwoFactorChallengeForm,
|
||||
type TwoFactorChallengeFormProps,
|
||||
type TwoFactorResult,
|
||||
} from "./two-factor-challenge-form";
|
||||
Reference in New Issue
Block a user