@dloizides/auth-web 1.23.0 → 1.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.25.0
4
+
5
+ **Opt-in hidden tenant name (BEAD-1 "Bead pattern app", D-RUN-33 "Jinx sign-up drops the Workspace name box").**
6
+ `<RegisterForm>`, `<SharedRegisterForm>` and `useRegisterForm` gain `deriveTenantName?: () => string`: the box is not
7
+ rendered, not required, and the value comes from the function, once per attempt (a retry under one idempotency key
8
+ resends it; `TENANT_NAME_TAKEN` or an edit draws a new one). `createOpaqueTenantName` is a ready source. Unset, nothing
9
+ changes.
10
+
11
+ ## 1.24.0
12
+
13
+ **Account deletion request (BEAD-1 "Bead pattern app", D-RUN-3 "How a signed-in user starts account deletion").**
14
+ `createBffAccountDeletionClient` talks to `POST /bff/account/delete-request` and `POST /bff/step-up/password`;
15
+ `useAccountDeletion` and `<AccountDeletionForm>` run the flow: optional reason, password step-up on a stale login
16
+ followed by one retry, then check your email. A 429 blocks the button for its `Retry-After`. Purely additive.
17
+
3
18
  ## 1.23.0
4
19
 
5
20
  **Opt-in shared registration (REGISTER-2 "One shared registration path").** `createSharedRegistrationClient` talks to
package/dist/index.d.mts CHANGED
@@ -658,6 +658,42 @@ declare const DEFAULT_VERIFY_NEW_PASSWORD_LABELS: ResetPasswordFormLabels;
658
658
  declare const DEFAULT_VERIFY_SIGN_IN_LABELS: VerifySignInLabels;
659
659
  declare const DEFAULT_VERIFY_EMAIL_LABELS: VerifyEmailLabels;
660
660
 
661
+ interface AccountDeletionFieldLabels {
662
+ label: string;
663
+ placeholder: string;
664
+ hint: string;
665
+ inputLabel: string;
666
+ }
667
+ /** Strings rendered by `<AccountDeletionForm>`. `{seconds}` and `{date}` are filled in. */
668
+ interface AccountDeletionLabels {
669
+ title: string;
670
+ subtitle: string;
671
+ reason: AccountDeletionFieldLabels;
672
+ submit: string;
673
+ submitHint: string;
674
+ submitting: string;
675
+ stepUpTitle: string;
676
+ stepUpSubtitle: string;
677
+ password: AccountDeletionFieldLabels;
678
+ stepUpSubmit: string;
679
+ stepUpSubmitHint: string;
680
+ checkEmailTitle: string;
681
+ checkEmailBody: string;
682
+ emailNotSentTitle: string;
683
+ emailNotSentBody: string;
684
+ scheduledDate: string;
685
+ alreadyRequestedTitle: string;
686
+ alreadyRequestedBody: string;
687
+ errorPasswordRequired: string;
688
+ errorWrongPassword: string;
689
+ errorSignInRequired: string;
690
+ errorRateLimited: string;
691
+ errorRateLimitedSeconds: string;
692
+ errorRetryLater: string;
693
+ errorFailed: string;
694
+ }
695
+ declare const DEFAULT_ACCOUNT_DELETION_LABELS: AccountDeletionLabels;
696
+
661
697
  /**
662
698
  * Who asked for a prefill — the difference between "the user requested this" and
663
699
  * "the app offered it".
@@ -2561,6 +2597,8 @@ interface RegisterFormProps<TResult> {
2561
2597
  * the username is derived from the email, and there is no confirm-password field.
2562
2598
  */
2563
2599
  compact?: boolean;
2600
+ /** Hides the tenant name box; this supplies a unique name instead, e.g. `createOpaqueTenantName`. */
2601
+ deriveTenantName?: () => string;
2564
2602
  }
2565
2603
  /** Themeable registration form built on `useRegisterForm`. */
2566
2604
  declare function RegisterForm<TResult>(props: Readonly<RegisterFormProps<TResult>>): ReactElement;
@@ -2608,6 +2646,8 @@ interface UseRegisterFormArgs<TResult> {
2608
2646
  compact?: boolean;
2609
2647
  /** Opt-in shared registration: `onSubmit` also gets the key and form time; an accepted result clears the passwords. */
2610
2648
  sharedRegistration?: boolean;
2649
+ /** Supplies a unique tenant name so none is typed or required. It gets no arguments, so it cannot embed the email. */
2650
+ deriveTenantName?: () => string;
2611
2651
  }
2612
2652
  interface UseRegisterFormResult<TResult> {
2613
2653
  state: RegisterFormValues;
@@ -2618,7 +2658,7 @@ interface UseRegisterFormResult<TResult> {
2618
2658
  error: RegisterErrorCode | null;
2619
2659
  }
2620
2660
  /** Headless registration form logic. */
2621
- declare function useRegisterForm<TResult>({ onSubmit, passwordPolicy, onSubmitAttempt, compact, sharedRegistration, }: UseRegisterFormArgs<TResult>): UseRegisterFormResult<TResult>;
2661
+ declare function useRegisterForm<TResult>({ onSubmit, passwordPolicy, onSubmitAttempt, compact, sharedRegistration, deriveTenantName, }: UseRegisterFormArgs<TResult>): UseRegisterFormResult<TResult>;
2622
2662
 
2623
2663
  /**
2624
2664
  * Pure registration helpers: trimming, client-side validation and decoding of a
@@ -2632,14 +2672,6 @@ declare function useRegisterForm<TResult>({ onSubmit, passwordPolicy, onSubmitAt
2632
2672
  /** The default password rule: 8+ characters with a letter, a digit and a special character. */
2633
2673
  declare function isRegisterPasswordStrong(password: string): boolean;
2634
2674
 
2635
- /**
2636
- * Compact registration (AUTH-REG-1 "Compact register form"): the form shows only
2637
- * "Your name", Email, Password (+ tenant name). Keycloak still needs a username,
2638
- * a first name AND a last name, so they are derived here before validation.
2639
- *
2640
- * In compact mode the single "Your name" input is stored in `firstName`.
2641
- */
2642
-
2643
2675
  interface SplitName {
2644
2676
  firstName: string;
2645
2677
  lastName: string;
@@ -2655,6 +2687,8 @@ declare function splitFullName(fullName: string): SplitName;
2655
2687
  * `[a-z0-9._-]` replaced by `_`. `Ada+shop@Example.com` becomes `ada_shop_example.com`.
2656
2688
  */
2657
2689
  declare function deriveUsernameFromEmail(email: string): string;
2690
+ /** A random tenant name for a form with no tenant box; it reveals nothing about the user and is its own slug. */
2691
+ declare function createOpaqueTenantName(): string;
2658
2692
 
2659
2693
  /**
2660
2694
  * `createBffAuthClient` — the one-line wiring of a same-origin `BffAuthClient`.
@@ -3069,4 +3103,119 @@ interface SharedRegisterFormProps<TResult> extends RegisterFormProps<TResult> {
3069
3103
  /** `<RegisterForm>` for the shared path: `onSubmit` also gets `meta`, and a 202 shows "check your email". */
3070
3104
  declare function SharedRegisterForm<TResult>({ onSuccess, onAccepted, ...formProps }: Readonly<SharedRegisterFormProps<TResult>>): ReactElement;
3071
3105
 
3072
- export { type AccountSettingsChangePasswordConfig, type AccountSettingsDevicePinConfig, type AccountSettingsLabels, type AccountSettingsPasskeysConfig, type AccountSettingsPreferredMethodConfig, AccountSettingsScreen, type AccountSettingsScreenProps, AuthScreen, type AuthScreenProps, AuthTestIds, type AuthTheme, type AuthThemeColors, AuthThemeProvider, type AuthThemeProviderProps, type AuthThemeRadii, type AuthThemeSpacing, type AuthThemeTypography, BffAuthStatus, type BffDeviceState, type BffLoginConfig, type BffLogoutClient, type BuildVerifyUrlTemplateOptions, CHANGE_PASSWORD_ENDPOINT, type ChangePasswordCapableClient, ChangePasswordCard, type ChangePasswordCardProps, ChangePasswordErrorKey, type ChangePasswordRequest, type ChangePasswordResult, type CreateBffAuthClientOptions, type CreateBffChangePasswordClientOptions, type CreateBffVerifyEmailClientOptions, DEFAULT_ACCOUNT_SETTINGS_LABELS, DEFAULT_AUTH_CARD_MAX_WIDTH, DEFAULT_DEMO_CREDENTIALS_HINT_LABELS, DEFAULT_DEVICE_PIN_ENROLL_LABELS, DEFAULT_DEVICE_PIN_SETTINGS_LABELS, DEFAULT_DEVICE_PIN_UNLOCK_LABELS, DEFAULT_FORGOT_PASSWORD_FIELDS_LABELS, DEFAULT_FORGOT_PASSWORD_LABELS, DEFAULT_LOGIN_LABELS, DEFAULT_OTP_LABELS, DEFAULT_PASSKEY_LOGIN_LABELS, DEFAULT_PASSKEY_SETTINGS_LABELS, DEFAULT_PIN_LABELS, DEFAULT_PREFERRED_METHOD_HINT_LABELS, DEFAULT_PREFERRED_METHOD_SETTINGS_LABELS, DEFAULT_REGISTER_LABELS, DEFAULT_RESET_PASSWORD_LABELS, DEFAULT_VERIFY_EMAIL_LABELS, DEFAULT_VERIFY_NEW_PASSWORD_LABELS, DEFAULT_VERIFY_SIGN_IN_LABELS, DEVICE_PIN_ALLOWED_DIGITS, DEVICE_PIN_DEFAULT_DIGITS, DemoCredentialsHint, type DemoCredentialsHintLabels, type DemoCredentialsHintProps, DemoCredentialsHintVariant, type DemoCredentialsHintWiring, type DemoCredentialsLoginFormProps, type DevicePinCapableClient, type DevicePinDisableCapableClient, type DevicePinEnrollCapableClient, DevicePinEnrollErrorKey, DevicePinEnrollForm, type DevicePinEnrollFormProps, type DevicePinEnrollLabels, type DevicePinEnrollResult, DevicePinErrorKey, DevicePinInput, type DevicePinInputProps, DevicePinLengthPicker, type DevicePinLengthPickerProps, DevicePinOffer, type DevicePinOfferProps, DevicePinSettingsCard, type DevicePinSettingsCardProps, type DevicePinSettingsLabels, type DevicePinUnlockCapableClient, type DevicePinUnlockLabels, type DevicePinUnlockResult, DevicePinUnlockScreen, type DevicePinUnlockScreenProps, type DevicePinUnlockedUser, ForgotPasswordFields, type ForgotPasswordFieldsLabels, type ForgotPasswordFieldsProps, ForgotPasswordForm, type ForgotPasswordFormLabels, type ForgotPasswordFormProps, type LoginConfigCapableClient, LoginForm, type LoginFormLabels, type LoginFormProps, OtpForm, type OtpFormLabels, type OtpFormProps, OtpLoginStep, PASSWORD_MAX_LENGTH, PASSWORD_MIN_LENGTH, PasskeyCeremonyMode, PasskeyCeremonyStatus, type PasskeyErrorCode, PasskeyLoginButton, type PasskeyLoginButtonProps, type PasskeyLoginLabels, PasskeySettingsCard, type PasskeySettingsCardProps, type PasskeySettingsLabels, PasswordPolicyError, type PerformBffLogoutOptions, PinForm, type PinFormLabels, type PinFormProps, type PreferencesClientOptions, type PreferredMethodClient, PreferredMethodHint, type PreferredMethodHintLabels, type PreferredMethodHintProps, PreferredMethodSettingsCard, type PreferredMethodSettingsCardProps, type PreferredMethodSettingsLabels, PrefillIntent, REGISTER_ENDPOINT, RESEND_VERIFICATION_ENDPOINT, RegisterErrorCode, type RegisterField, type RegisterFieldLabels, RegisterForm, type RegisterFormLabels, type RegisterFormProps, type RegisterFormValues, type RegisterInputField, type RegisterPasswordPolicy, type RegisterSubmitMeta, type RegisterSubmitOutcome, type RegisterSubmitValues, RegisterTestIds, ResetPasswordError, ResetPasswordForm, type ResetPasswordFormLabels, type ResetPasswordFormProps, type RoleRoute, type RoleRouteTable, SharedRegisterForm, type SharedRegisterFormProps, type SharedRegisterResult, type SharedRegistrationClient, type SplitName, type UseBffAuthOptions, type UseBffAuthResult, type UseBffForgotPasswordOptions, type UseBffLoginConfigResult, type UseBffResetPasswordOptions, type UseChangePasswordArgs, type UseChangePasswordResult, type UseDemoCredentialsOptions, type UseDemoCredentialsResult, type UseDevicePinDisableArgs, type UseDevicePinDisableResult, type UseDevicePinEnrollArgs, type UseDevicePinEnrollResult, type UseDevicePinUnlockArgs, type UseDevicePinUnlockResult, type UseForgotPasswordSubmitArgs, type UseForgotPasswordSubmitResult, type UseOtpLoginOptions, type UseOtpLoginResult, type UsePasskeyCeremonyOptions, type UsePasskeyCeremonyResult, type UsePinLoginOptions, type UsePinLoginResult, type UsePreferredMethodSettingArgs, type UsePreferredMethodSettingResult, type UseRegisterFormArgs, type UseRegisterFormResult, type UseResendVerificationArgs, type UseResendVerificationResult, type UseResetPasswordFormArgs, type UseResetPasswordFormResult, type UseVerifyEmailArgs, type UseVerifyEmailResult, VERIFY_AND_LOGIN_ENDPOINT, VERIFY_EMAIL_ENDPOINT, VERIFY_TOKEN_PLACEHOLDER, type VerifyEmailCapableClient, VerifyEmailErrorCode, type VerifyEmailLabels, VerifyEmailPhase, type VerifyEmailResult, VerifyEmailScreen, type VerifyEmailScreenProps, type VerifySignInLabels, buildVerifyUrlTemplate, cachePreferredMethod, clearCachedPreferredMethod, collectUserRoles, createBffAuthClient, createBffChangePasswordClient, createBffVerifyEmailClient, createPreferencesClient, createSharedRegistrationClient, defaultAuthTheme, deriveUsernameFromEmail, isAllowedPinDigits, isPasswordValid, isRegisterAccepted, isRegisterPasswordStrong, isValidForgotPasswordEmail, performBffLogout, readCachedPreferredMethod, readPasskeyError, readPasskeyRegistered, readVerifyToken, resolveAccessibleRoutes, resolveAccountList, resolveDemoAccounts, resolveDemoCredentials, resolvePostLoginRoute, splitFullName, startPasskeyLogin, startPasskeyRegistration, syncPreferredMethodFromServer, useAuthTheme, useBffAuth, useBffForgotPassword, useBffLoginConfig, useBffResetPassword, useChangePassword, useDemoCredentials, useDevicePinDisable, useDevicePinEnroll, useDevicePinUnlock, useForgotPasswordSubmit, useOtpLogin, usePasskeyCeremony, usePinLogin, usePreferredMethodSetting, useRegisterForm, useResendVerification, useResetPasswordForm, useVerifyEmail, validatePasswordPolicy, verifyEmailErrorText, withTestIdPrefix };
3106
+ /** What `POST /bff/account/delete-request` answered, as the form routes on it. */
3107
+ declare const enum AccountDeletionStatus {
3108
+ Accepted = "accepted",
3109
+ StepUpRequired = "stepUpRequired",
3110
+ AlreadyRequested = "alreadyRequested",
3111
+ SignInRequired = "signInRequired",
3112
+ RateLimited = "rateLimited",
3113
+ RetryLater = "retryLater",
3114
+ Failed = "failed"
3115
+ }
3116
+
3117
+ /** What `POST /bff/step-up/password` answered. */
3118
+ declare const enum StepUpStatus {
3119
+ Confirmed = "confirmed",
3120
+ WrongPassword = "wrongPassword",
3121
+ RateLimited = "rateLimited",
3122
+ Failed = "failed"
3123
+ }
3124
+
3125
+ declare const ACCOUNT_DELETE_REQUEST_ENDPOINT = "/bff/account/delete-request";
3126
+ declare const STEP_UP_PASSWORD_ENDPOINT = "/bff/step-up/password";
3127
+ /** The 202 body: the request is recorded and waits on the emailed confirmation. */
3128
+ interface AccountDeletionReceipt {
3129
+ requestId: string;
3130
+ scheduledDeletionDate: string;
3131
+ confirmationEmailSent: boolean;
3132
+ }
3133
+ type AccountDeletionResult = {
3134
+ status: AccountDeletionStatus.Accepted;
3135
+ receipt: AccountDeletionReceipt;
3136
+ } | {
3137
+ status: AccountDeletionStatus.RateLimited;
3138
+ retryAfterSeconds: number | null;
3139
+ } | {
3140
+ status: AccountDeletionStatus.StepUpRequired | AccountDeletionStatus.AlreadyRequested | AccountDeletionStatus.SignInRequired | AccountDeletionStatus.RetryLater | AccountDeletionStatus.Failed;
3141
+ };
3142
+ type StepUpResult = {
3143
+ status: StepUpStatus.RateLimited;
3144
+ retryAfterSeconds: number | null;
3145
+ } | {
3146
+ status: StepUpStatus.Confirmed | StepUpStatus.WrongPassword | StepUpStatus.Failed;
3147
+ };
3148
+ /** The two calls the account deletion form needs. Neither rejects on an expected outcome. */
3149
+ interface AccountDeletionCapableClient {
3150
+ requestDeletion(reason?: string): Promise<AccountDeletionResult>;
3151
+ stepUpPassword(password: string): Promise<StepUpResult>;
3152
+ }
3153
+ /** Same-origin client: session cookie, `X-BFF-Csrf: 1`, JSON. A transport error resolves to `Failed`. */
3154
+ declare function createBffAccountDeletionClient(options?: CreateBffVerifyEmailClientOptions): AccountDeletionCapableClient;
3155
+
3156
+ /** Failure causes of the account deletion form. */
3157
+ declare const enum AccountDeletionErrorKey {
3158
+ PasswordRequired = "passwordRequired",
3159
+ WrongPassword = "wrongPassword",
3160
+ SignInRequired = "signInRequired",
3161
+ RateLimited = "rateLimited",
3162
+ RetryLater = "retryLater",
3163
+ Failed = "failed"
3164
+ }
3165
+
3166
+ /** Which view the account deletion form shows. */
3167
+ declare const enum AccountDeletionPhase {
3168
+ Confirm = "confirm",
3169
+ StepUp = "stepUp",
3170
+ Accepted = "accepted",
3171
+ AlreadyRequested = "alreadyRequested"
3172
+ }
3173
+
3174
+ interface UseAccountDeletionArgs {
3175
+ client: AccountDeletionCapableClient;
3176
+ onAccepted?: (receipt: AccountDeletionReceipt) => void;
3177
+ onSignInRequired?: () => void;
3178
+ }
3179
+ interface UseAccountDeletionResult {
3180
+ phase: AccountDeletionPhase;
3181
+ reason: string;
3182
+ password: string;
3183
+ setReason: (value: string) => void;
3184
+ setPassword: (value: string) => void;
3185
+ submitting: boolean;
3186
+ blocked: boolean;
3187
+ retryAfterSeconds: number | null;
3188
+ errorKey: AccountDeletionErrorKey | null;
3189
+ receipt: AccountDeletionReceipt | null;
3190
+ submit: () => void;
3191
+ }
3192
+ /** State behind the account deletion form: request, password step-up + one retry, 429 wait. */
3193
+ declare function useAccountDeletion(args: UseAccountDeletionArgs): UseAccountDeletionResult;
3194
+
3195
+ interface AccountDeletionFormProps {
3196
+ client: AccountDeletionCapableClient;
3197
+ /** Localised copy. Partial: unspecified top-level keys fall back to English defaults. */
3198
+ labels?: Partial<AccountDeletionLabels>;
3199
+ theme?: AuthTheme;
3200
+ testIdPrefix?: string;
3201
+ /** Rendered at the end of every view (e.g. a cancel link). */
3202
+ footer?: ReactNode;
3203
+ onAccepted?: (receipt: AccountDeletionReceipt) => void;
3204
+ onSignInRequired?: () => void;
3205
+ }
3206
+ /** Asks for an optional reason, steps up with the password when the login is stale, then says check your email. */
3207
+ declare function AccountDeletionForm({ client, labels: labelsProp, theme: themeProp, testIdPrefix, footer, onAccepted, onSignInRequired, }: Readonly<AccountDeletionFormProps>): ReactElement;
3208
+
3209
+ /** `testID` values for `<AccountDeletionForm>`. */
3210
+ declare const AccountDeletionTestIds: {
3211
+ readonly form: "account-deletion-form";
3212
+ readonly reasonInput: "account-deletion-reason-input";
3213
+ readonly stepUpInput: "account-deletion-password-input";
3214
+ readonly submitButton: "account-deletion-submit-button";
3215
+ readonly error: "account-deletion-error";
3216
+ readonly checkEmail: "account-deletion-check-email";
3217
+ readonly emailNotSent: "account-deletion-email-not-sent";
3218
+ readonly alreadyRequested: "account-deletion-already-requested";
3219
+ };
3220
+
3221
+ export { ACCOUNT_DELETE_REQUEST_ENDPOINT, type AccountDeletionCapableClient, AccountDeletionErrorKey, type AccountDeletionFieldLabels, AccountDeletionForm, type AccountDeletionFormProps, type AccountDeletionLabels, AccountDeletionPhase, type AccountDeletionReceipt, type AccountDeletionResult, AccountDeletionStatus, AccountDeletionTestIds, type AccountSettingsChangePasswordConfig, type AccountSettingsDevicePinConfig, type AccountSettingsLabels, type AccountSettingsPasskeysConfig, type AccountSettingsPreferredMethodConfig, AccountSettingsScreen, type AccountSettingsScreenProps, AuthScreen, type AuthScreenProps, AuthTestIds, type AuthTheme, type AuthThemeColors, AuthThemeProvider, type AuthThemeProviderProps, type AuthThemeRadii, type AuthThemeSpacing, type AuthThemeTypography, BffAuthStatus, type BffDeviceState, type BffLoginConfig, type BffLogoutClient, type BuildVerifyUrlTemplateOptions, CHANGE_PASSWORD_ENDPOINT, type ChangePasswordCapableClient, ChangePasswordCard, type ChangePasswordCardProps, ChangePasswordErrorKey, type ChangePasswordRequest, type ChangePasswordResult, type CreateBffAuthClientOptions, type CreateBffChangePasswordClientOptions, type CreateBffVerifyEmailClientOptions, DEFAULT_ACCOUNT_DELETION_LABELS, DEFAULT_ACCOUNT_SETTINGS_LABELS, DEFAULT_AUTH_CARD_MAX_WIDTH, DEFAULT_DEMO_CREDENTIALS_HINT_LABELS, DEFAULT_DEVICE_PIN_ENROLL_LABELS, DEFAULT_DEVICE_PIN_SETTINGS_LABELS, DEFAULT_DEVICE_PIN_UNLOCK_LABELS, DEFAULT_FORGOT_PASSWORD_FIELDS_LABELS, DEFAULT_FORGOT_PASSWORD_LABELS, DEFAULT_LOGIN_LABELS, DEFAULT_OTP_LABELS, DEFAULT_PASSKEY_LOGIN_LABELS, DEFAULT_PASSKEY_SETTINGS_LABELS, DEFAULT_PIN_LABELS, DEFAULT_PREFERRED_METHOD_HINT_LABELS, DEFAULT_PREFERRED_METHOD_SETTINGS_LABELS, DEFAULT_REGISTER_LABELS, DEFAULT_RESET_PASSWORD_LABELS, DEFAULT_VERIFY_EMAIL_LABELS, DEFAULT_VERIFY_NEW_PASSWORD_LABELS, DEFAULT_VERIFY_SIGN_IN_LABELS, DEVICE_PIN_ALLOWED_DIGITS, DEVICE_PIN_DEFAULT_DIGITS, DemoCredentialsHint, type DemoCredentialsHintLabels, type DemoCredentialsHintProps, DemoCredentialsHintVariant, type DemoCredentialsHintWiring, type DemoCredentialsLoginFormProps, type DevicePinCapableClient, type DevicePinDisableCapableClient, type DevicePinEnrollCapableClient, DevicePinEnrollErrorKey, DevicePinEnrollForm, type DevicePinEnrollFormProps, type DevicePinEnrollLabels, type DevicePinEnrollResult, DevicePinErrorKey, DevicePinInput, type DevicePinInputProps, DevicePinLengthPicker, type DevicePinLengthPickerProps, DevicePinOffer, type DevicePinOfferProps, DevicePinSettingsCard, type DevicePinSettingsCardProps, type DevicePinSettingsLabels, type DevicePinUnlockCapableClient, type DevicePinUnlockLabels, type DevicePinUnlockResult, DevicePinUnlockScreen, type DevicePinUnlockScreenProps, type DevicePinUnlockedUser, ForgotPasswordFields, type ForgotPasswordFieldsLabels, type ForgotPasswordFieldsProps, ForgotPasswordForm, type ForgotPasswordFormLabels, type ForgotPasswordFormProps, type LoginConfigCapableClient, LoginForm, type LoginFormLabels, type LoginFormProps, OtpForm, type OtpFormLabels, type OtpFormProps, OtpLoginStep, PASSWORD_MAX_LENGTH, PASSWORD_MIN_LENGTH, PasskeyCeremonyMode, PasskeyCeremonyStatus, type PasskeyErrorCode, PasskeyLoginButton, type PasskeyLoginButtonProps, type PasskeyLoginLabels, PasskeySettingsCard, type PasskeySettingsCardProps, type PasskeySettingsLabels, PasswordPolicyError, type PerformBffLogoutOptions, PinForm, type PinFormLabels, type PinFormProps, type PreferencesClientOptions, type PreferredMethodClient, PreferredMethodHint, type PreferredMethodHintLabels, type PreferredMethodHintProps, PreferredMethodSettingsCard, type PreferredMethodSettingsCardProps, type PreferredMethodSettingsLabels, PrefillIntent, REGISTER_ENDPOINT, RESEND_VERIFICATION_ENDPOINT, RegisterErrorCode, type RegisterField, type RegisterFieldLabels, RegisterForm, type RegisterFormLabels, type RegisterFormProps, type RegisterFormValues, type RegisterInputField, type RegisterPasswordPolicy, type RegisterSubmitMeta, type RegisterSubmitOutcome, type RegisterSubmitValues, RegisterTestIds, ResetPasswordError, ResetPasswordForm, type ResetPasswordFormLabels, type ResetPasswordFormProps, type RoleRoute, type RoleRouteTable, STEP_UP_PASSWORD_ENDPOINT, SharedRegisterForm, type SharedRegisterFormProps, type SharedRegisterResult, type SharedRegistrationClient, type SplitName, type StepUpResult, StepUpStatus, type UseAccountDeletionArgs, type UseAccountDeletionResult, type UseBffAuthOptions, type UseBffAuthResult, type UseBffForgotPasswordOptions, type UseBffLoginConfigResult, type UseBffResetPasswordOptions, type UseChangePasswordArgs, type UseChangePasswordResult, type UseDemoCredentialsOptions, type UseDemoCredentialsResult, type UseDevicePinDisableArgs, type UseDevicePinDisableResult, type UseDevicePinEnrollArgs, type UseDevicePinEnrollResult, type UseDevicePinUnlockArgs, type UseDevicePinUnlockResult, type UseForgotPasswordSubmitArgs, type UseForgotPasswordSubmitResult, type UseOtpLoginOptions, type UseOtpLoginResult, type UsePasskeyCeremonyOptions, type UsePasskeyCeremonyResult, type UsePinLoginOptions, type UsePinLoginResult, type UsePreferredMethodSettingArgs, type UsePreferredMethodSettingResult, type UseRegisterFormArgs, type UseRegisterFormResult, type UseResendVerificationArgs, type UseResendVerificationResult, type UseResetPasswordFormArgs, type UseResetPasswordFormResult, type UseVerifyEmailArgs, type UseVerifyEmailResult, VERIFY_AND_LOGIN_ENDPOINT, VERIFY_EMAIL_ENDPOINT, VERIFY_TOKEN_PLACEHOLDER, type VerifyEmailCapableClient, VerifyEmailErrorCode, type VerifyEmailLabels, VerifyEmailPhase, type VerifyEmailResult, VerifyEmailScreen, type VerifyEmailScreenProps, type VerifySignInLabels, buildVerifyUrlTemplate, cachePreferredMethod, clearCachedPreferredMethod, collectUserRoles, createBffAccountDeletionClient, createBffAuthClient, createBffChangePasswordClient, createBffVerifyEmailClient, createOpaqueTenantName, createPreferencesClient, createSharedRegistrationClient, defaultAuthTheme, deriveUsernameFromEmail, isAllowedPinDigits, isPasswordValid, isRegisterAccepted, isRegisterPasswordStrong, isValidForgotPasswordEmail, performBffLogout, readCachedPreferredMethod, readPasskeyError, readPasskeyRegistered, readVerifyToken, resolveAccessibleRoutes, resolveAccountList, resolveDemoAccounts, resolveDemoCredentials, resolvePostLoginRoute, splitFullName, startPasskeyLogin, startPasskeyRegistration, syncPreferredMethodFromServer, useAccountDeletion, useAuthTheme, useBffAuth, useBffForgotPassword, useBffLoginConfig, useBffResetPassword, useChangePassword, useDemoCredentials, useDevicePinDisable, useDevicePinEnroll, useDevicePinUnlock, useForgotPasswordSubmit, useOtpLogin, usePasskeyCeremony, usePinLogin, usePreferredMethodSetting, useRegisterForm, useResendVerification, useResetPasswordForm, useVerifyEmail, validatePasswordPolicy, verifyEmailErrorText, withTestIdPrefix };
package/dist/index.d.ts CHANGED
@@ -658,6 +658,42 @@ declare const DEFAULT_VERIFY_NEW_PASSWORD_LABELS: ResetPasswordFormLabels;
658
658
  declare const DEFAULT_VERIFY_SIGN_IN_LABELS: VerifySignInLabels;
659
659
  declare const DEFAULT_VERIFY_EMAIL_LABELS: VerifyEmailLabels;
660
660
 
661
+ interface AccountDeletionFieldLabels {
662
+ label: string;
663
+ placeholder: string;
664
+ hint: string;
665
+ inputLabel: string;
666
+ }
667
+ /** Strings rendered by `<AccountDeletionForm>`. `{seconds}` and `{date}` are filled in. */
668
+ interface AccountDeletionLabels {
669
+ title: string;
670
+ subtitle: string;
671
+ reason: AccountDeletionFieldLabels;
672
+ submit: string;
673
+ submitHint: string;
674
+ submitting: string;
675
+ stepUpTitle: string;
676
+ stepUpSubtitle: string;
677
+ password: AccountDeletionFieldLabels;
678
+ stepUpSubmit: string;
679
+ stepUpSubmitHint: string;
680
+ checkEmailTitle: string;
681
+ checkEmailBody: string;
682
+ emailNotSentTitle: string;
683
+ emailNotSentBody: string;
684
+ scheduledDate: string;
685
+ alreadyRequestedTitle: string;
686
+ alreadyRequestedBody: string;
687
+ errorPasswordRequired: string;
688
+ errorWrongPassword: string;
689
+ errorSignInRequired: string;
690
+ errorRateLimited: string;
691
+ errorRateLimitedSeconds: string;
692
+ errorRetryLater: string;
693
+ errorFailed: string;
694
+ }
695
+ declare const DEFAULT_ACCOUNT_DELETION_LABELS: AccountDeletionLabels;
696
+
661
697
  /**
662
698
  * Who asked for a prefill — the difference between "the user requested this" and
663
699
  * "the app offered it".
@@ -2561,6 +2597,8 @@ interface RegisterFormProps<TResult> {
2561
2597
  * the username is derived from the email, and there is no confirm-password field.
2562
2598
  */
2563
2599
  compact?: boolean;
2600
+ /** Hides the tenant name box; this supplies a unique name instead, e.g. `createOpaqueTenantName`. */
2601
+ deriveTenantName?: () => string;
2564
2602
  }
2565
2603
  /** Themeable registration form built on `useRegisterForm`. */
2566
2604
  declare function RegisterForm<TResult>(props: Readonly<RegisterFormProps<TResult>>): ReactElement;
@@ -2608,6 +2646,8 @@ interface UseRegisterFormArgs<TResult> {
2608
2646
  compact?: boolean;
2609
2647
  /** Opt-in shared registration: `onSubmit` also gets the key and form time; an accepted result clears the passwords. */
2610
2648
  sharedRegistration?: boolean;
2649
+ /** Supplies a unique tenant name so none is typed or required. It gets no arguments, so it cannot embed the email. */
2650
+ deriveTenantName?: () => string;
2611
2651
  }
2612
2652
  interface UseRegisterFormResult<TResult> {
2613
2653
  state: RegisterFormValues;
@@ -2618,7 +2658,7 @@ interface UseRegisterFormResult<TResult> {
2618
2658
  error: RegisterErrorCode | null;
2619
2659
  }
2620
2660
  /** Headless registration form logic. */
2621
- declare function useRegisterForm<TResult>({ onSubmit, passwordPolicy, onSubmitAttempt, compact, sharedRegistration, }: UseRegisterFormArgs<TResult>): UseRegisterFormResult<TResult>;
2661
+ declare function useRegisterForm<TResult>({ onSubmit, passwordPolicy, onSubmitAttempt, compact, sharedRegistration, deriveTenantName, }: UseRegisterFormArgs<TResult>): UseRegisterFormResult<TResult>;
2622
2662
 
2623
2663
  /**
2624
2664
  * Pure registration helpers: trimming, client-side validation and decoding of a
@@ -2632,14 +2672,6 @@ declare function useRegisterForm<TResult>({ onSubmit, passwordPolicy, onSubmitAt
2632
2672
  /** The default password rule: 8+ characters with a letter, a digit and a special character. */
2633
2673
  declare function isRegisterPasswordStrong(password: string): boolean;
2634
2674
 
2635
- /**
2636
- * Compact registration (AUTH-REG-1 "Compact register form"): the form shows only
2637
- * "Your name", Email, Password (+ tenant name). Keycloak still needs a username,
2638
- * a first name AND a last name, so they are derived here before validation.
2639
- *
2640
- * In compact mode the single "Your name" input is stored in `firstName`.
2641
- */
2642
-
2643
2675
  interface SplitName {
2644
2676
  firstName: string;
2645
2677
  lastName: string;
@@ -2655,6 +2687,8 @@ declare function splitFullName(fullName: string): SplitName;
2655
2687
  * `[a-z0-9._-]` replaced by `_`. `Ada+shop@Example.com` becomes `ada_shop_example.com`.
2656
2688
  */
2657
2689
  declare function deriveUsernameFromEmail(email: string): string;
2690
+ /** A random tenant name for a form with no tenant box; it reveals nothing about the user and is its own slug. */
2691
+ declare function createOpaqueTenantName(): string;
2658
2692
 
2659
2693
  /**
2660
2694
  * `createBffAuthClient` — the one-line wiring of a same-origin `BffAuthClient`.
@@ -3069,4 +3103,119 @@ interface SharedRegisterFormProps<TResult> extends RegisterFormProps<TResult> {
3069
3103
  /** `<RegisterForm>` for the shared path: `onSubmit` also gets `meta`, and a 202 shows "check your email". */
3070
3104
  declare function SharedRegisterForm<TResult>({ onSuccess, onAccepted, ...formProps }: Readonly<SharedRegisterFormProps<TResult>>): ReactElement;
3071
3105
 
3072
- export { type AccountSettingsChangePasswordConfig, type AccountSettingsDevicePinConfig, type AccountSettingsLabels, type AccountSettingsPasskeysConfig, type AccountSettingsPreferredMethodConfig, AccountSettingsScreen, type AccountSettingsScreenProps, AuthScreen, type AuthScreenProps, AuthTestIds, type AuthTheme, type AuthThemeColors, AuthThemeProvider, type AuthThemeProviderProps, type AuthThemeRadii, type AuthThemeSpacing, type AuthThemeTypography, BffAuthStatus, type BffDeviceState, type BffLoginConfig, type BffLogoutClient, type BuildVerifyUrlTemplateOptions, CHANGE_PASSWORD_ENDPOINT, type ChangePasswordCapableClient, ChangePasswordCard, type ChangePasswordCardProps, ChangePasswordErrorKey, type ChangePasswordRequest, type ChangePasswordResult, type CreateBffAuthClientOptions, type CreateBffChangePasswordClientOptions, type CreateBffVerifyEmailClientOptions, DEFAULT_ACCOUNT_SETTINGS_LABELS, DEFAULT_AUTH_CARD_MAX_WIDTH, DEFAULT_DEMO_CREDENTIALS_HINT_LABELS, DEFAULT_DEVICE_PIN_ENROLL_LABELS, DEFAULT_DEVICE_PIN_SETTINGS_LABELS, DEFAULT_DEVICE_PIN_UNLOCK_LABELS, DEFAULT_FORGOT_PASSWORD_FIELDS_LABELS, DEFAULT_FORGOT_PASSWORD_LABELS, DEFAULT_LOGIN_LABELS, DEFAULT_OTP_LABELS, DEFAULT_PASSKEY_LOGIN_LABELS, DEFAULT_PASSKEY_SETTINGS_LABELS, DEFAULT_PIN_LABELS, DEFAULT_PREFERRED_METHOD_HINT_LABELS, DEFAULT_PREFERRED_METHOD_SETTINGS_LABELS, DEFAULT_REGISTER_LABELS, DEFAULT_RESET_PASSWORD_LABELS, DEFAULT_VERIFY_EMAIL_LABELS, DEFAULT_VERIFY_NEW_PASSWORD_LABELS, DEFAULT_VERIFY_SIGN_IN_LABELS, DEVICE_PIN_ALLOWED_DIGITS, DEVICE_PIN_DEFAULT_DIGITS, DemoCredentialsHint, type DemoCredentialsHintLabels, type DemoCredentialsHintProps, DemoCredentialsHintVariant, type DemoCredentialsHintWiring, type DemoCredentialsLoginFormProps, type DevicePinCapableClient, type DevicePinDisableCapableClient, type DevicePinEnrollCapableClient, DevicePinEnrollErrorKey, DevicePinEnrollForm, type DevicePinEnrollFormProps, type DevicePinEnrollLabels, type DevicePinEnrollResult, DevicePinErrorKey, DevicePinInput, type DevicePinInputProps, DevicePinLengthPicker, type DevicePinLengthPickerProps, DevicePinOffer, type DevicePinOfferProps, DevicePinSettingsCard, type DevicePinSettingsCardProps, type DevicePinSettingsLabels, type DevicePinUnlockCapableClient, type DevicePinUnlockLabels, type DevicePinUnlockResult, DevicePinUnlockScreen, type DevicePinUnlockScreenProps, type DevicePinUnlockedUser, ForgotPasswordFields, type ForgotPasswordFieldsLabels, type ForgotPasswordFieldsProps, ForgotPasswordForm, type ForgotPasswordFormLabels, type ForgotPasswordFormProps, type LoginConfigCapableClient, LoginForm, type LoginFormLabels, type LoginFormProps, OtpForm, type OtpFormLabels, type OtpFormProps, OtpLoginStep, PASSWORD_MAX_LENGTH, PASSWORD_MIN_LENGTH, PasskeyCeremonyMode, PasskeyCeremonyStatus, type PasskeyErrorCode, PasskeyLoginButton, type PasskeyLoginButtonProps, type PasskeyLoginLabels, PasskeySettingsCard, type PasskeySettingsCardProps, type PasskeySettingsLabels, PasswordPolicyError, type PerformBffLogoutOptions, PinForm, type PinFormLabels, type PinFormProps, type PreferencesClientOptions, type PreferredMethodClient, PreferredMethodHint, type PreferredMethodHintLabels, type PreferredMethodHintProps, PreferredMethodSettingsCard, type PreferredMethodSettingsCardProps, type PreferredMethodSettingsLabels, PrefillIntent, REGISTER_ENDPOINT, RESEND_VERIFICATION_ENDPOINT, RegisterErrorCode, type RegisterField, type RegisterFieldLabels, RegisterForm, type RegisterFormLabels, type RegisterFormProps, type RegisterFormValues, type RegisterInputField, type RegisterPasswordPolicy, type RegisterSubmitMeta, type RegisterSubmitOutcome, type RegisterSubmitValues, RegisterTestIds, ResetPasswordError, ResetPasswordForm, type ResetPasswordFormLabels, type ResetPasswordFormProps, type RoleRoute, type RoleRouteTable, SharedRegisterForm, type SharedRegisterFormProps, type SharedRegisterResult, type SharedRegistrationClient, type SplitName, type UseBffAuthOptions, type UseBffAuthResult, type UseBffForgotPasswordOptions, type UseBffLoginConfigResult, type UseBffResetPasswordOptions, type UseChangePasswordArgs, type UseChangePasswordResult, type UseDemoCredentialsOptions, type UseDemoCredentialsResult, type UseDevicePinDisableArgs, type UseDevicePinDisableResult, type UseDevicePinEnrollArgs, type UseDevicePinEnrollResult, type UseDevicePinUnlockArgs, type UseDevicePinUnlockResult, type UseForgotPasswordSubmitArgs, type UseForgotPasswordSubmitResult, type UseOtpLoginOptions, type UseOtpLoginResult, type UsePasskeyCeremonyOptions, type UsePasskeyCeremonyResult, type UsePinLoginOptions, type UsePinLoginResult, type UsePreferredMethodSettingArgs, type UsePreferredMethodSettingResult, type UseRegisterFormArgs, type UseRegisterFormResult, type UseResendVerificationArgs, type UseResendVerificationResult, type UseResetPasswordFormArgs, type UseResetPasswordFormResult, type UseVerifyEmailArgs, type UseVerifyEmailResult, VERIFY_AND_LOGIN_ENDPOINT, VERIFY_EMAIL_ENDPOINT, VERIFY_TOKEN_PLACEHOLDER, type VerifyEmailCapableClient, VerifyEmailErrorCode, type VerifyEmailLabels, VerifyEmailPhase, type VerifyEmailResult, VerifyEmailScreen, type VerifyEmailScreenProps, type VerifySignInLabels, buildVerifyUrlTemplate, cachePreferredMethod, clearCachedPreferredMethod, collectUserRoles, createBffAuthClient, createBffChangePasswordClient, createBffVerifyEmailClient, createPreferencesClient, createSharedRegistrationClient, defaultAuthTheme, deriveUsernameFromEmail, isAllowedPinDigits, isPasswordValid, isRegisterAccepted, isRegisterPasswordStrong, isValidForgotPasswordEmail, performBffLogout, readCachedPreferredMethod, readPasskeyError, readPasskeyRegistered, readVerifyToken, resolveAccessibleRoutes, resolveAccountList, resolveDemoAccounts, resolveDemoCredentials, resolvePostLoginRoute, splitFullName, startPasskeyLogin, startPasskeyRegistration, syncPreferredMethodFromServer, useAuthTheme, useBffAuth, useBffForgotPassword, useBffLoginConfig, useBffResetPassword, useChangePassword, useDemoCredentials, useDevicePinDisable, useDevicePinEnroll, useDevicePinUnlock, useForgotPasswordSubmit, useOtpLogin, usePasskeyCeremony, usePinLogin, usePreferredMethodSetting, useRegisterForm, useResendVerification, useResetPasswordForm, useVerifyEmail, validatePasswordPolicy, verifyEmailErrorText, withTestIdPrefix };
3106
+ /** What `POST /bff/account/delete-request` answered, as the form routes on it. */
3107
+ declare const enum AccountDeletionStatus {
3108
+ Accepted = "accepted",
3109
+ StepUpRequired = "stepUpRequired",
3110
+ AlreadyRequested = "alreadyRequested",
3111
+ SignInRequired = "signInRequired",
3112
+ RateLimited = "rateLimited",
3113
+ RetryLater = "retryLater",
3114
+ Failed = "failed"
3115
+ }
3116
+
3117
+ /** What `POST /bff/step-up/password` answered. */
3118
+ declare const enum StepUpStatus {
3119
+ Confirmed = "confirmed",
3120
+ WrongPassword = "wrongPassword",
3121
+ RateLimited = "rateLimited",
3122
+ Failed = "failed"
3123
+ }
3124
+
3125
+ declare const ACCOUNT_DELETE_REQUEST_ENDPOINT = "/bff/account/delete-request";
3126
+ declare const STEP_UP_PASSWORD_ENDPOINT = "/bff/step-up/password";
3127
+ /** The 202 body: the request is recorded and waits on the emailed confirmation. */
3128
+ interface AccountDeletionReceipt {
3129
+ requestId: string;
3130
+ scheduledDeletionDate: string;
3131
+ confirmationEmailSent: boolean;
3132
+ }
3133
+ type AccountDeletionResult = {
3134
+ status: AccountDeletionStatus.Accepted;
3135
+ receipt: AccountDeletionReceipt;
3136
+ } | {
3137
+ status: AccountDeletionStatus.RateLimited;
3138
+ retryAfterSeconds: number | null;
3139
+ } | {
3140
+ status: AccountDeletionStatus.StepUpRequired | AccountDeletionStatus.AlreadyRequested | AccountDeletionStatus.SignInRequired | AccountDeletionStatus.RetryLater | AccountDeletionStatus.Failed;
3141
+ };
3142
+ type StepUpResult = {
3143
+ status: StepUpStatus.RateLimited;
3144
+ retryAfterSeconds: number | null;
3145
+ } | {
3146
+ status: StepUpStatus.Confirmed | StepUpStatus.WrongPassword | StepUpStatus.Failed;
3147
+ };
3148
+ /** The two calls the account deletion form needs. Neither rejects on an expected outcome. */
3149
+ interface AccountDeletionCapableClient {
3150
+ requestDeletion(reason?: string): Promise<AccountDeletionResult>;
3151
+ stepUpPassword(password: string): Promise<StepUpResult>;
3152
+ }
3153
+ /** Same-origin client: session cookie, `X-BFF-Csrf: 1`, JSON. A transport error resolves to `Failed`. */
3154
+ declare function createBffAccountDeletionClient(options?: CreateBffVerifyEmailClientOptions): AccountDeletionCapableClient;
3155
+
3156
+ /** Failure causes of the account deletion form. */
3157
+ declare const enum AccountDeletionErrorKey {
3158
+ PasswordRequired = "passwordRequired",
3159
+ WrongPassword = "wrongPassword",
3160
+ SignInRequired = "signInRequired",
3161
+ RateLimited = "rateLimited",
3162
+ RetryLater = "retryLater",
3163
+ Failed = "failed"
3164
+ }
3165
+
3166
+ /** Which view the account deletion form shows. */
3167
+ declare const enum AccountDeletionPhase {
3168
+ Confirm = "confirm",
3169
+ StepUp = "stepUp",
3170
+ Accepted = "accepted",
3171
+ AlreadyRequested = "alreadyRequested"
3172
+ }
3173
+
3174
+ interface UseAccountDeletionArgs {
3175
+ client: AccountDeletionCapableClient;
3176
+ onAccepted?: (receipt: AccountDeletionReceipt) => void;
3177
+ onSignInRequired?: () => void;
3178
+ }
3179
+ interface UseAccountDeletionResult {
3180
+ phase: AccountDeletionPhase;
3181
+ reason: string;
3182
+ password: string;
3183
+ setReason: (value: string) => void;
3184
+ setPassword: (value: string) => void;
3185
+ submitting: boolean;
3186
+ blocked: boolean;
3187
+ retryAfterSeconds: number | null;
3188
+ errorKey: AccountDeletionErrorKey | null;
3189
+ receipt: AccountDeletionReceipt | null;
3190
+ submit: () => void;
3191
+ }
3192
+ /** State behind the account deletion form: request, password step-up + one retry, 429 wait. */
3193
+ declare function useAccountDeletion(args: UseAccountDeletionArgs): UseAccountDeletionResult;
3194
+
3195
+ interface AccountDeletionFormProps {
3196
+ client: AccountDeletionCapableClient;
3197
+ /** Localised copy. Partial: unspecified top-level keys fall back to English defaults. */
3198
+ labels?: Partial<AccountDeletionLabels>;
3199
+ theme?: AuthTheme;
3200
+ testIdPrefix?: string;
3201
+ /** Rendered at the end of every view (e.g. a cancel link). */
3202
+ footer?: ReactNode;
3203
+ onAccepted?: (receipt: AccountDeletionReceipt) => void;
3204
+ onSignInRequired?: () => void;
3205
+ }
3206
+ /** Asks for an optional reason, steps up with the password when the login is stale, then says check your email. */
3207
+ declare function AccountDeletionForm({ client, labels: labelsProp, theme: themeProp, testIdPrefix, footer, onAccepted, onSignInRequired, }: Readonly<AccountDeletionFormProps>): ReactElement;
3208
+
3209
+ /** `testID` values for `<AccountDeletionForm>`. */
3210
+ declare const AccountDeletionTestIds: {
3211
+ readonly form: "account-deletion-form";
3212
+ readonly reasonInput: "account-deletion-reason-input";
3213
+ readonly stepUpInput: "account-deletion-password-input";
3214
+ readonly submitButton: "account-deletion-submit-button";
3215
+ readonly error: "account-deletion-error";
3216
+ readonly checkEmail: "account-deletion-check-email";
3217
+ readonly emailNotSent: "account-deletion-email-not-sent";
3218
+ readonly alreadyRequested: "account-deletion-already-requested";
3219
+ };
3220
+
3221
+ export { ACCOUNT_DELETE_REQUEST_ENDPOINT, type AccountDeletionCapableClient, AccountDeletionErrorKey, type AccountDeletionFieldLabels, AccountDeletionForm, type AccountDeletionFormProps, type AccountDeletionLabels, AccountDeletionPhase, type AccountDeletionReceipt, type AccountDeletionResult, AccountDeletionStatus, AccountDeletionTestIds, type AccountSettingsChangePasswordConfig, type AccountSettingsDevicePinConfig, type AccountSettingsLabels, type AccountSettingsPasskeysConfig, type AccountSettingsPreferredMethodConfig, AccountSettingsScreen, type AccountSettingsScreenProps, AuthScreen, type AuthScreenProps, AuthTestIds, type AuthTheme, type AuthThemeColors, AuthThemeProvider, type AuthThemeProviderProps, type AuthThemeRadii, type AuthThemeSpacing, type AuthThemeTypography, BffAuthStatus, type BffDeviceState, type BffLoginConfig, type BffLogoutClient, type BuildVerifyUrlTemplateOptions, CHANGE_PASSWORD_ENDPOINT, type ChangePasswordCapableClient, ChangePasswordCard, type ChangePasswordCardProps, ChangePasswordErrorKey, type ChangePasswordRequest, type ChangePasswordResult, type CreateBffAuthClientOptions, type CreateBffChangePasswordClientOptions, type CreateBffVerifyEmailClientOptions, DEFAULT_ACCOUNT_DELETION_LABELS, DEFAULT_ACCOUNT_SETTINGS_LABELS, DEFAULT_AUTH_CARD_MAX_WIDTH, DEFAULT_DEMO_CREDENTIALS_HINT_LABELS, DEFAULT_DEVICE_PIN_ENROLL_LABELS, DEFAULT_DEVICE_PIN_SETTINGS_LABELS, DEFAULT_DEVICE_PIN_UNLOCK_LABELS, DEFAULT_FORGOT_PASSWORD_FIELDS_LABELS, DEFAULT_FORGOT_PASSWORD_LABELS, DEFAULT_LOGIN_LABELS, DEFAULT_OTP_LABELS, DEFAULT_PASSKEY_LOGIN_LABELS, DEFAULT_PASSKEY_SETTINGS_LABELS, DEFAULT_PIN_LABELS, DEFAULT_PREFERRED_METHOD_HINT_LABELS, DEFAULT_PREFERRED_METHOD_SETTINGS_LABELS, DEFAULT_REGISTER_LABELS, DEFAULT_RESET_PASSWORD_LABELS, DEFAULT_VERIFY_EMAIL_LABELS, DEFAULT_VERIFY_NEW_PASSWORD_LABELS, DEFAULT_VERIFY_SIGN_IN_LABELS, DEVICE_PIN_ALLOWED_DIGITS, DEVICE_PIN_DEFAULT_DIGITS, DemoCredentialsHint, type DemoCredentialsHintLabels, type DemoCredentialsHintProps, DemoCredentialsHintVariant, type DemoCredentialsHintWiring, type DemoCredentialsLoginFormProps, type DevicePinCapableClient, type DevicePinDisableCapableClient, type DevicePinEnrollCapableClient, DevicePinEnrollErrorKey, DevicePinEnrollForm, type DevicePinEnrollFormProps, type DevicePinEnrollLabels, type DevicePinEnrollResult, DevicePinErrorKey, DevicePinInput, type DevicePinInputProps, DevicePinLengthPicker, type DevicePinLengthPickerProps, DevicePinOffer, type DevicePinOfferProps, DevicePinSettingsCard, type DevicePinSettingsCardProps, type DevicePinSettingsLabels, type DevicePinUnlockCapableClient, type DevicePinUnlockLabels, type DevicePinUnlockResult, DevicePinUnlockScreen, type DevicePinUnlockScreenProps, type DevicePinUnlockedUser, ForgotPasswordFields, type ForgotPasswordFieldsLabels, type ForgotPasswordFieldsProps, ForgotPasswordForm, type ForgotPasswordFormLabels, type ForgotPasswordFormProps, type LoginConfigCapableClient, LoginForm, type LoginFormLabels, type LoginFormProps, OtpForm, type OtpFormLabels, type OtpFormProps, OtpLoginStep, PASSWORD_MAX_LENGTH, PASSWORD_MIN_LENGTH, PasskeyCeremonyMode, PasskeyCeremonyStatus, type PasskeyErrorCode, PasskeyLoginButton, type PasskeyLoginButtonProps, type PasskeyLoginLabels, PasskeySettingsCard, type PasskeySettingsCardProps, type PasskeySettingsLabels, PasswordPolicyError, type PerformBffLogoutOptions, PinForm, type PinFormLabels, type PinFormProps, type PreferencesClientOptions, type PreferredMethodClient, PreferredMethodHint, type PreferredMethodHintLabels, type PreferredMethodHintProps, PreferredMethodSettingsCard, type PreferredMethodSettingsCardProps, type PreferredMethodSettingsLabels, PrefillIntent, REGISTER_ENDPOINT, RESEND_VERIFICATION_ENDPOINT, RegisterErrorCode, type RegisterField, type RegisterFieldLabels, RegisterForm, type RegisterFormLabels, type RegisterFormProps, type RegisterFormValues, type RegisterInputField, type RegisterPasswordPolicy, type RegisterSubmitMeta, type RegisterSubmitOutcome, type RegisterSubmitValues, RegisterTestIds, ResetPasswordError, ResetPasswordForm, type ResetPasswordFormLabels, type ResetPasswordFormProps, type RoleRoute, type RoleRouteTable, STEP_UP_PASSWORD_ENDPOINT, SharedRegisterForm, type SharedRegisterFormProps, type SharedRegisterResult, type SharedRegistrationClient, type SplitName, type StepUpResult, StepUpStatus, type UseAccountDeletionArgs, type UseAccountDeletionResult, type UseBffAuthOptions, type UseBffAuthResult, type UseBffForgotPasswordOptions, type UseBffLoginConfigResult, type UseBffResetPasswordOptions, type UseChangePasswordArgs, type UseChangePasswordResult, type UseDemoCredentialsOptions, type UseDemoCredentialsResult, type UseDevicePinDisableArgs, type UseDevicePinDisableResult, type UseDevicePinEnrollArgs, type UseDevicePinEnrollResult, type UseDevicePinUnlockArgs, type UseDevicePinUnlockResult, type UseForgotPasswordSubmitArgs, type UseForgotPasswordSubmitResult, type UseOtpLoginOptions, type UseOtpLoginResult, type UsePasskeyCeremonyOptions, type UsePasskeyCeremonyResult, type UsePinLoginOptions, type UsePinLoginResult, type UsePreferredMethodSettingArgs, type UsePreferredMethodSettingResult, type UseRegisterFormArgs, type UseRegisterFormResult, type UseResendVerificationArgs, type UseResendVerificationResult, type UseResetPasswordFormArgs, type UseResetPasswordFormResult, type UseVerifyEmailArgs, type UseVerifyEmailResult, VERIFY_AND_LOGIN_ENDPOINT, VERIFY_EMAIL_ENDPOINT, VERIFY_TOKEN_PLACEHOLDER, type VerifyEmailCapableClient, VerifyEmailErrorCode, type VerifyEmailLabels, VerifyEmailPhase, type VerifyEmailResult, VerifyEmailScreen, type VerifyEmailScreenProps, type VerifySignInLabels, buildVerifyUrlTemplate, cachePreferredMethod, clearCachedPreferredMethod, collectUserRoles, createBffAccountDeletionClient, createBffAuthClient, createBffChangePasswordClient, createBffVerifyEmailClient, createOpaqueTenantName, createPreferencesClient, createSharedRegistrationClient, defaultAuthTheme, deriveUsernameFromEmail, isAllowedPinDigits, isPasswordValid, isRegisterAccepted, isRegisterPasswordStrong, isValidForgotPasswordEmail, performBffLogout, readCachedPreferredMethod, readPasskeyError, readPasskeyRegistered, readVerifyToken, resolveAccessibleRoutes, resolveAccountList, resolveDemoAccounts, resolveDemoCredentials, resolvePostLoginRoute, splitFullName, startPasskeyLogin, startPasskeyRegistration, syncPreferredMethodFromServer, useAccountDeletion, useAuthTheme, useBffAuth, useBffForgotPassword, useBffLoginConfig, useBffResetPassword, useChangePassword, useDemoCredentials, useDevicePinDisable, useDevicePinEnroll, useDevicePinUnlock, useForgotPasswordSubmit, useOtpLogin, usePasskeyCeremony, usePinLogin, usePreferredMethodSetting, useRegisterForm, useResendVerification, useResetPasswordForm, useVerifyEmail, validatePasswordPolicy, verifyEmailErrorText, withTestIdPrefix };