@passflow/react 0.13.0 → 0.15.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 +43 -0
- package/README.md +21 -8
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.es.js +146 -143
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/error/index.d.cts +7 -0
- package/dist/src/components/error/index.d.ts +1 -1
- package/dist/src/components/error/index.d.ts.map +1 -1
- package/dist/src/components/flow/consent/index.d.cts +13 -0
- package/dist/src/components/flow/consent/index.d.ts +1 -1
- package/dist/src/components/flow/consent/index.d.ts.map +1 -1
- package/dist/src/components/flow/consent/screen.d.cts +9 -0
- package/dist/src/components/flow/consent/screen.d.ts +2 -2
- package/dist/src/components/flow/consent/screen.d.ts.map +1 -1
- package/dist/src/components/flow/device-verify/index.d.cts +10 -0
- package/dist/src/components/flow/device-verify/index.d.ts +1 -1
- package/dist/src/components/flow/device-verify/index.d.ts.map +1 -1
- package/dist/src/components/flow/device-verify/screen.d.cts +4 -0
- package/dist/src/components/flow/device-verify/screen.d.ts +2 -2
- package/dist/src/components/flow/device-verify/screen.d.ts.map +1 -1
- package/dist/src/components/flow/index.d.cts +5 -0
- package/dist/src/components/flow/index.d.ts +4 -4
- package/dist/src/components/flow/index.d.ts.map +1 -1
- package/dist/src/components/flow/passflow/index.d.cts +16 -0
- package/dist/src/components/flow/passflow/index.d.ts +5 -1
- package/dist/src/components/flow/passflow/index.d.ts.map +1 -1
- package/dist/src/components/flow/two-factor-setup/index.d.cts +10 -0
- package/dist/src/components/flow/two-factor-setup/index.d.ts +2 -2
- package/dist/src/components/flow/two-factor-setup/index.d.ts.map +1 -1
- package/dist/src/components/flow/two-factor-setup-magic-link/index.d.cts +35 -0
- package/dist/src/components/flow/two-factor-setup-magic-link/index.d.ts +2 -2
- package/dist/src/components/flow/two-factor-setup-magic-link/index.d.ts.map +1 -1
- package/dist/src/components/flow/two-factor-verify/index.d.cts +11 -0
- package/dist/src/components/flow/two-factor-verify/index.d.ts +2 -2
- package/dist/src/components/flow/two-factor-verify/index.d.ts.map +1 -1
- package/dist/src/components/form/forgot-password/forgot-password-success.d.cts +2 -0
- package/dist/src/components/form/forgot-password/forgot-password-success.d.ts +1 -1
- package/dist/src/components/form/forgot-password/forgot-password-success.d.ts.map +1 -1
- package/dist/src/components/form/forgot-password/forgot-password.d.cts +9 -0
- package/dist/src/components/form/forgot-password/forgot-password.d.ts +1 -1
- package/dist/src/components/form/forgot-password/forgot-password.d.ts.map +1 -1
- package/dist/src/components/form/forgot-password/index.d.cts +3 -0
- package/dist/src/components/form/forgot-password/index.d.ts +2 -2
- package/dist/src/components/form/index.d.cts +10 -0
- package/dist/src/components/form/index.d.ts +9 -9
- package/dist/src/components/form/index.d.ts.map +1 -1
- package/dist/src/components/form/invitation-join/index.d.cts +7 -0
- package/dist/src/components/form/invitation-join/index.d.ts +1 -2
- package/dist/src/components/form/invitation-join/index.d.ts.map +1 -1
- package/dist/src/components/form/reset-password/index.d.cts +9 -0
- package/dist/src/components/form/reset-password/index.d.ts +2 -2
- package/dist/src/components/form/reset-password/index.d.ts.map +1 -1
- package/dist/src/components/form/signin/index.d.cts +15 -0
- package/dist/src/components/form/signin/index.d.ts +2 -2
- package/dist/src/components/form/signin/index.d.ts.map +1 -1
- package/dist/src/components/form/signup/index.d.cts +14 -0
- package/dist/src/components/form/signup/index.d.ts +2 -2
- package/dist/src/components/form/signup/index.d.ts.map +1 -1
- package/dist/src/components/form/two-factor-challenge/index.d.cts +10 -0
- package/dist/src/components/form/two-factor-challenge/index.d.ts +1 -1
- package/dist/src/components/form/two-factor-challenge/index.d.ts.map +1 -1
- package/dist/src/components/form/two-factor-challenge/method-selector.d.cts +12 -0
- package/dist/src/components/form/two-factor-challenge/method-selector.d.ts +2 -2
- package/dist/src/components/form/two-factor-setup/index.d.cts +2 -0
- package/dist/src/components/form/two-factor-setup/index.d.ts +1 -1
- package/dist/src/components/form/two-factor-setup/two-factor-setup-form.d.cts +9 -0
- package/dist/src/components/form/two-factor-setup/two-factor-setup-form.d.ts +1 -1
- package/dist/src/components/form/two-factor-setup/two-factor-setup-form.d.ts.map +1 -1
- package/dist/src/components/form/two-factor-verify/index.d.cts +3 -0
- package/dist/src/components/form/two-factor-verify/index.d.ts +2 -2
- package/dist/src/components/form/two-factor-verify/index.d.ts.map +1 -1
- package/dist/src/components/form/two-factor-verify/two-factor-recovery-form.d.cts +13 -0
- package/dist/src/components/form/two-factor-verify/two-factor-recovery-form.d.ts +1 -1
- package/dist/src/components/form/two-factor-verify/two-factor-recovery-form.d.ts.map +1 -1
- package/dist/src/components/form/two-factor-verify/two-factor-verify-form.d.cts +16 -0
- package/dist/src/components/form/two-factor-verify/two-factor-verify-form.d.ts +1 -1
- package/dist/src/components/form/two-factor-verify/two-factor-verify-form.d.ts.map +1 -1
- package/dist/src/components/form/verify-challenge/index.d.cts +3 -0
- package/dist/src/components/form/verify-challenge/index.d.ts +2 -2
- package/dist/src/components/form/verify-challenge/timer-button.d.cts +9 -0
- package/dist/src/components/form/verify-challenge/timer-button.d.ts +1 -1
- package/dist/src/components/form/verify-challenge/timer-button.d.ts.map +1 -1
- package/dist/src/components/form/verify-challenge/verify-challenge-magic-link.d.cts +2 -0
- package/dist/src/components/form/verify-challenge/verify-challenge-magic-link.d.ts +1 -1
- package/dist/src/components/form/verify-challenge/verify-challenge-magic-link.d.ts.map +1 -1
- package/dist/src/components/form/verify-challenge/verify-challenge-otp-manual.d.cts +16 -0
- package/dist/src/components/form/verify-challenge/verify-challenge-otp-manual.d.ts +1 -1
- package/dist/src/components/form/verify-challenge/verify-challenge-otp-manual.d.ts.map +1 -1
- package/dist/src/components/form/verify-challenge/verify-challenge-otp-redirect.d.cts +9 -0
- package/dist/src/components/form/verify-challenge/verify-challenge-otp-redirect.d.ts +1 -2
- package/dist/src/components/form/verify-challenge/verify-challenge-otp-redirect.d.ts.map +1 -1
- package/dist/src/components/form/verify-challenge/verify-challenge-otp.d.cts +12 -0
- package/dist/src/components/form/verify-challenge/verify-challenge-otp.d.ts +2 -2
- package/dist/src/components/form/verify-challenge/verify-challenge-otp.d.ts.map +1 -1
- package/dist/src/components/form/verify-challenge/verify-challenge-success.d.cts +3 -0
- package/dist/src/components/form/verify-challenge/verify-challenge-success.d.ts +1 -1
- package/dist/src/components/form/verify-challenge/verify-challenge-success.d.ts.map +1 -1
- package/dist/src/components/form/wrapper/index.d.cts +2 -0
- package/dist/src/components/form/wrapper/index.d.ts +1 -1
- package/dist/src/components/passkey/index.d.cts +7 -0
- package/dist/src/components/passkey/index.d.ts +1 -1
- package/dist/src/components/passkey/index.d.ts.map +1 -1
- package/dist/src/components/passkey/passkey-actions.d.cts +13 -0
- package/dist/src/components/passkey/passkey-actions.d.ts +1 -1
- package/dist/src/components/passkey/passkey-actions.d.ts.map +1 -1
- package/dist/src/components/passkey/passkey-dialog.d.cts +10 -0
- package/dist/src/components/passkey/passkey-dialog.d.ts +1 -1
- package/dist/src/components/passkey/passkey-list.d.cts +9 -0
- package/dist/src/components/passkey/passkey-list.d.ts +2 -2
- package/dist/src/components/passkey/passkey-list.d.ts.map +1 -1
- package/dist/src/components/provider/index.d.cts +4 -0
- package/dist/src/components/provider/index.d.ts +3 -3
- package/dist/src/components/provider/index.d.ts.map +1 -1
- package/dist/src/components/provider/passflow-provider.d.cts +160 -0
- package/dist/src/components/provider/passflow-provider.d.ts +24 -4
- package/dist/src/components/provider/passflow-provider.d.ts.map +1 -1
- package/dist/src/components/provider/upgrade-provider.d.cts +85 -0
- package/dist/src/components/provider/upgrade-provider.d.ts +39 -3
- package/dist/src/components/provider/upgrade-provider.d.ts.map +1 -1
- package/dist/src/components/ui/button/index.d.cts +34 -0
- package/dist/src/components/ui/button/index.d.ts +3 -2
- package/dist/src/components/ui/button/index.d.ts.map +1 -1
- package/dist/src/components/ui/continuing-status/index.d.cts +8 -0
- package/dist/src/components/ui/continuing-status/index.d.ts +8 -0
- package/dist/src/components/ui/continuing-status/index.d.ts.map +1 -0
- package/dist/src/components/ui/country-flag/index.d.cts +7 -0
- package/dist/src/components/ui/country-flag/index.d.ts +1 -1
- package/dist/src/components/ui/country-flag/index.d.ts.map +1 -1
- package/dist/src/components/ui/country-flag/positions.d.cts +245 -0
- package/dist/src/components/ui/country-flag/positions.d.ts +241 -241
- package/dist/src/components/ui/country-flag/positions.d.ts.map +1 -1
- package/dist/src/components/ui/dialog/index.d.cts +20 -0
- package/dist/src/components/ui/dialog/index.d.ts +18 -18
- package/dist/src/components/ui/dialog/index.d.ts.map +1 -1
- package/dist/src/components/ui/fields/field-otp.d.cts +35 -0
- package/dist/src/components/ui/fields/field-otp.d.ts +35 -0
- package/dist/src/components/ui/fields/field-otp.d.ts.map +1 -0
- package/dist/src/components/ui/fields/field-password.d.cts +13 -0
- package/dist/src/components/ui/fields/field-password.d.ts +4 -4
- package/dist/src/components/ui/fields/field-password.d.ts.map +1 -1
- package/dist/src/components/ui/fields/field-phone.d.cts +11 -0
- package/dist/src/components/ui/fields/field-phone.d.ts +1 -1
- package/dist/src/components/ui/fields/field-phone.d.ts.map +1 -1
- package/dist/src/components/ui/fields/field-text.d.cts +8 -0
- package/dist/src/components/ui/fields/field-text.d.ts +3 -3
- package/dist/src/components/ui/fields/field-text.d.ts.map +1 -1
- package/dist/src/components/ui/fields/index.d.cts +5 -0
- package/dist/src/components/ui/fields/index.d.ts +4 -3
- package/dist/src/components/ui/fields/index.d.ts.map +1 -1
- package/dist/src/components/ui/icon/index.d.cts +11 -0
- package/dist/src/components/ui/icon/index.d.ts +1 -1
- package/dist/src/components/ui/icon/index.d.ts.map +1 -1
- package/dist/src/components/ui/index.d.cts +14 -0
- package/dist/src/components/ui/index.d.ts +13 -12
- package/dist/src/components/ui/index.d.ts.map +1 -1
- package/dist/src/components/ui/link/index.d.cts +11 -0
- package/dist/src/components/ui/link/index.d.ts +1 -1
- package/dist/src/components/ui/link/index.d.ts.map +1 -1
- package/dist/src/components/ui/login-screen/code-entry.d.cts +4 -0
- package/dist/src/components/ui/login-screen/code-entry.d.ts +2 -2
- package/dist/src/components/ui/login-screen/consent.d.cts +15 -0
- package/dist/src/components/ui/login-screen/consent.d.ts +2 -2
- package/dist/src/components/ui/login-screen/credentials.d.cts +4 -0
- package/dist/src/components/ui/login-screen/credentials.d.ts +2 -2
- package/dist/src/components/ui/login-screen/credentials.d.ts.map +1 -1
- package/dist/src/components/ui/login-screen/device-approval.d.cts +4 -0
- package/dist/src/components/ui/login-screen/device-approval.d.ts +2 -2
- package/dist/src/components/ui/login-screen/general-error.d.cts +4 -0
- package/dist/src/components/ui/login-screen/general-error.d.ts +2 -2
- package/dist/src/components/ui/login-screen/index.d.cts +4 -0
- package/dist/src/components/ui/login-screen/index.d.ts +3 -3
- package/dist/src/components/ui/login-screen/index.d.ts.map +1 -1
- package/dist/src/components/ui/login-screen/invitation.d.cts +4 -0
- package/dist/src/components/ui/login-screen/invitation.d.ts +2 -2
- package/dist/src/components/ui/login-screen/login-screen.d.cts +4 -0
- package/dist/src/components/ui/login-screen/login-screen.d.ts +2 -2
- package/dist/src/components/ui/login-screen/passkey-progress.d.cts +4 -0
- package/dist/src/components/ui/login-screen/passkey-progress.d.ts +2 -2
- package/dist/src/components/ui/login-screen/second-factor.d.cts +4 -0
- package/dist/src/components/ui/login-screen/second-factor.d.ts +2 -2
- package/dist/src/components/ui/login-screen/shared.d.cts +15 -0
- package/dist/src/components/ui/login-screen/shared.d.ts +2 -2
- package/dist/src/components/ui/login-screen/shell.d.cts +13 -0
- package/dist/src/components/ui/login-screen/shell.d.ts +1 -1
- package/dist/src/components/ui/login-screen/shell.d.ts.map +1 -1
- package/dist/src/components/ui/login-screen/status.d.cts +4 -0
- package/dist/src/components/ui/login-screen/status.d.ts +2 -2
- package/dist/src/components/ui/login-screen/types.d.cts +192 -0
- package/dist/src/components/ui/login-screen/types.d.ts +2 -2
- package/dist/src/components/ui/login-screen/types.d.ts.map +1 -1
- package/dist/src/components/ui/popover/index.d.cts +7 -0
- package/dist/src/components/ui/popover/index.d.ts +5 -5
- package/dist/src/components/ui/popover/index.d.ts.map +1 -1
- package/dist/src/components/ui/providers-box/index.d.cts +10 -0
- package/dist/src/components/ui/providers-box/index.d.ts +2 -2
- package/dist/src/components/ui/providers-box/index.d.ts.map +1 -1
- package/dist/src/components/ui/spinner/index.d.cts +23 -0
- package/dist/src/components/ui/spinner/index.d.ts +1 -1
- package/dist/src/components/ui/spinner/index.d.ts.map +1 -1
- package/dist/src/components/ui/switch/index.d.cts +22 -0
- package/dist/src/components/ui/switch/index.d.ts +1 -1
- package/dist/src/components/ui/switch/index.d.ts.map +1 -1
- package/dist/src/components/ui/upgrade-dialog/challenge.d.cts +12 -0
- package/dist/src/components/ui/upgrade-dialog/challenge.d.ts +2 -2
- package/dist/src/components/ui/upgrade-dialog/factor-list.d.cts +20 -0
- package/dist/src/components/ui/upgrade-dialog/factor-list.d.ts +2 -2
- package/dist/src/components/ui/upgrade-dialog/index.d.cts +8 -0
- package/dist/src/components/ui/upgrade-dialog/index.d.ts +7 -7
- package/dist/src/components/ui/upgrade-dialog/index.d.ts.map +1 -1
- package/dist/src/components/ui/upgrade-dialog/state-mapping.d.cts +130 -0
- package/dist/src/components/ui/upgrade-dialog/state-mapping.d.ts +12 -1
- package/dist/src/components/ui/upgrade-dialog/state-mapping.d.ts.map +1 -1
- package/dist/src/components/ui/upgrade-dialog/status.d.cts +27 -0
- package/dist/src/components/ui/upgrade-dialog/status.d.ts +2 -2
- package/dist/src/components/ui/upgrade-dialog/types.d.cts +188 -0
- package/dist/src/components/ui/upgrade-dialog/upgrade-dialog.d.cts +13 -0
- package/dist/src/components/ui/upgrade-dialog/upgrade-dialog.d.ts +2 -2
- package/dist/src/components/ui/visually-hidden/index.d.cts +17 -0
- package/dist/src/components/ui/visually-hidden/index.d.ts +17 -0
- package/dist/src/components/ui/visually-hidden/index.d.ts.map +1 -0
- package/dist/src/constants/countries-phone-code.d.cts +253 -0
- package/dist/src/constants/countries-phone-code.d.ts.map +1 -1
- package/dist/src/constants/formats.d.cts +4 -0
- package/dist/src/constants/formats.d.ts.map +1 -1
- package/dist/src/constants/index.d.cts +3 -0
- package/dist/src/constants/index.d.ts +2 -2
- package/dist/src/context/auth-context.d.cts +23 -0
- package/dist/src/context/auth-context.d.ts +3 -3
- package/dist/src/context/auth-context.d.ts.map +1 -1
- package/dist/src/context/index.d.cts +6 -0
- package/dist/src/context/index.d.ts +5 -5
- package/dist/src/context/index.d.ts.map +1 -1
- package/dist/src/context/navigation-context.d.cts +25 -0
- package/dist/src/context/navigation-context.d.ts +1 -1
- package/dist/src/context/passflow-context.d.cts +26 -0
- package/dist/src/context/passflow-context.d.ts +3 -3
- package/dist/src/context/passflow-context.d.ts.map +1 -1
- package/dist/src/context/router-context.d.cts +42 -0
- package/dist/src/context/router-context.d.ts.map +1 -1
- package/dist/src/context/upgrade-context.d.cts +107 -0
- package/dist/src/context/upgrade-context.d.ts +24 -2
- package/dist/src/hocs/index.d.cts +2 -0
- package/dist/src/hocs/index.d.ts +1 -1
- package/dist/src/hocs/with-error.d.cts +8 -0
- package/dist/src/hocs/with-error.d.ts +5 -5
- package/dist/src/hocs/with-error.d.ts.map +1 -1
- package/dist/src/hooks/index.d.cts +28 -0
- package/dist/src/hooks/index.d.ts +27 -27
- package/dist/src/hooks/index.d.ts.map +1 -1
- package/dist/src/hooks/use-app-settings.d.cts +16 -0
- package/dist/src/hooks/use-app-settings.d.ts +1 -1
- package/dist/src/hooks/use-app-settings.d.ts.map +1 -1
- package/dist/src/hooks/use-auth-cloud-redirect.d.cts +4 -0
- package/dist/src/hooks/use-auth.d.cts +3 -0
- package/dist/src/hooks/use-auth.d.ts +1 -1
- package/dist/src/hooks/use-auth.d.ts.map +1 -1
- package/dist/src/hooks/use-consent.d.cts +68 -0
- package/dist/src/hooks/use-device-verify.d.cts +96 -0
- package/dist/src/hooks/use-device-verify.d.ts +1 -1
- package/dist/src/hooks/use-device-verify.d.ts.map +1 -1
- package/dist/src/hooks/use-forgot-password.d.cts +10 -0
- package/dist/src/hooks/use-forgot-password.d.ts +1 -1
- package/dist/src/hooks/use-join-invite.d.cts +8 -0
- package/dist/src/hooks/use-logout.d.cts +8 -0
- package/dist/src/hooks/use-navigation.d.cts +29 -0
- package/dist/src/hooks/use-navigation.d.ts +2 -2
- package/dist/src/hooks/use-navigation.d.ts.map +1 -1
- package/dist/src/hooks/use-outsideclick.d.cts +3 -0
- package/dist/src/hooks/use-outsideclick.d.ts +2 -2
- package/dist/src/hooks/use-outsideclick.d.ts.map +1 -1
- package/dist/src/hooks/use-passflow-store.d.cts +3 -0
- package/dist/src/hooks/use-passflow-store.d.ts +1 -1
- package/dist/src/hooks/use-passflow.d.cts +3 -0
- package/dist/src/hooks/use-passflow.d.ts +1 -1
- package/dist/src/hooks/use-passflow.d.ts.map +1 -1
- package/dist/src/hooks/use-passwordless-complete.d.cts +10 -0
- package/dist/src/hooks/use-passwordless-complete.d.ts +1 -1
- package/dist/src/hooks/use-passwordless-complete.d.ts.map +1 -1
- package/dist/src/hooks/use-provider.d.cts +7 -0
- package/dist/src/hooks/use-provider.d.ts +1 -1
- package/dist/src/hooks/use-provider.d.ts.map +1 -1
- package/dist/src/hooks/use-reset-password.d.cts +9 -0
- package/dist/src/hooks/use-session-expired.d.cts +49 -0
- package/dist/src/hooks/use-signin.d.cts +11 -0
- package/dist/src/hooks/use-signin.d.ts +2 -2
- package/dist/src/hooks/use-signin.d.ts.map +1 -1
- package/dist/src/hooks/use-signup.d.cts +11 -0
- package/dist/src/hooks/use-signup.d.ts +2 -2
- package/dist/src/hooks/use-signup.d.ts.map +1 -1
- package/dist/src/hooks/use-trusted-devices.d.cts +21 -0
- package/dist/src/hooks/use-trusted-devices.d.ts +1 -1
- package/dist/src/hooks/use-two-factor-challenge.d.cts +16 -0
- package/dist/src/hooks/use-two-factor-challenge.d.ts +1 -1
- package/dist/src/hooks/use-two-factor-manage.d.cts +15 -0
- package/dist/src/hooks/use-two-factor-manage.d.ts +1 -1
- package/dist/src/hooks/use-two-factor-methods.d.cts +14 -0
- package/dist/src/hooks/use-two-factor-methods.d.ts +1 -1
- package/dist/src/hooks/use-two-factor-setup-magic-link.d.cts +55 -0
- package/dist/src/hooks/use-two-factor-setup-magic-link.d.ts.map +1 -1
- package/dist/src/hooks/use-two-factor-setup.d.cts +18 -0
- package/dist/src/hooks/use-two-factor-setup.d.ts +1 -1
- package/dist/src/hooks/use-two-factor-status.d.cts +13 -0
- package/dist/src/hooks/use-two-factor-status.d.ts +1 -1
- package/dist/src/hooks/use-two-factor-verify.d.cts +20 -0
- package/dist/src/hooks/use-two-factor-verify.d.ts +2 -2
- package/dist/src/hooks/use-two-factor-verify.d.ts.map +1 -1
- package/dist/src/hooks/use-upgrade.d.cts +53 -0
- package/dist/src/hooks/use-upgrade.d.ts +12 -2
- package/dist/src/hooks/use-upgrade.d.ts.map +1 -1
- package/dist/src/hooks/use-user-passkeys.d.cts +12 -0
- package/dist/src/hooks/use-user-passkeys.d.ts +1 -1
- package/dist/src/index.d.cts +10 -0
- package/dist/src/index.d.ts +8 -8
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/types/auth-errors.d.cts +8 -0
- package/dist/src/types/device-errors.d.cts +95 -0
- package/dist/src/types/index.d.cts +26 -0
- package/dist/src/types/index.d.ts +4 -4
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/types/two-factor-errors.d.cts +14 -0
- package/dist/src/utils/auth-error.d.cts +7 -0
- package/dist/src/utils/auth-error.d.ts +1 -1
- package/dist/src/utils/auth-error.d.ts.map +1 -1
- package/dist/src/utils/classify-device-error.d.cts +35 -0
- package/dist/src/utils/classify-device-error.d.ts +1 -1
- package/dist/src/utils/classify-device-error.d.ts.map +1 -1
- package/dist/src/utils/classify-two-factor-error.d.cts +13 -0
- package/dist/src/utils/classify-two-factor-error.d.ts +1 -1
- package/dist/src/utils/cn.d.cts +3 -0
- package/dist/src/utils/cn.d.ts +1 -1
- package/dist/src/utils/cn.d.ts.map +1 -1
- package/dist/src/utils/dayjs/format.d.cts +8 -0
- package/dist/src/utils/dayjs/format.d.ts.map +1 -1
- package/dist/src/utils/dayjs/index.d.cts +2 -0
- package/dist/src/utils/dayjs/index.d.ts +1 -1
- package/dist/src/utils/get-app-version.d.cts +7 -0
- package/dist/src/utils/get-auth-methods.d.cts +30 -0
- package/dist/src/utils/get-auth-methods.d.ts +1 -1
- package/dist/src/utils/get-auth-methods.d.ts.map +1 -1
- package/dist/src/utils/get-form-labels.d.cts +10 -0
- package/dist/src/utils/get-form-labels.d.ts +5 -5
- package/dist/src/utils/get-form-labels.d.ts.map +1 -1
- package/dist/src/utils/get-url-errors.d.cts +5 -0
- package/dist/src/utils/get-url-errors.d.ts.map +1 -1
- package/dist/src/utils/get-url-with-tokens.d.cts +4 -0
- package/dist/src/utils/get-url-with-tokens.d.ts +1 -1
- package/dist/src/utils/get-url-with-tokens.d.ts.map +1 -1
- package/dist/src/utils/index.d.cts +18 -0
- package/dist/src/utils/index.d.ts +17 -17
- package/dist/src/utils/index.d.ts.map +1 -1
- package/dist/src/utils/invitation-auth-chrome.d.cts +8 -0
- package/dist/src/utils/invitation-auth-chrome.d.ts.map +1 -1
- package/dist/src/utils/login-theme.d.cts +8 -0
- package/dist/src/utils/login-theme.d.ts +1 -1
- package/dist/src/utils/login-theme.d.ts.map +1 -1
- package/dist/src/utils/second-factor.d.cts +21 -0
- package/dist/src/utils/second-factor.d.ts +3 -3
- package/dist/src/utils/second-factor.d.ts.map +1 -1
- package/dist/src/utils/two-factor-loop-prevention.d.cts +40 -0
- package/dist/src/utils/two-factor-loop-prevention.d.ts.map +1 -1
- package/dist/src/utils/undefined-on-catch.d.cts +2 -0
- package/dist/src/utils/upgrade-auth.d.cts +82 -0
- package/dist/src/utils/upgrade-auth.d.ts +45 -1
- package/dist/src/utils/upgrade-auth.d.ts.map +1 -1
- package/dist/src/utils/url-params.d.cts +14 -0
- package/dist/src/utils/url-params.d.ts.map +1 -1
- package/dist/src/utils/validate-url.d.cts +2 -0
- package/dist/src/utils/validate-url.d.ts.map +1 -1
- package/dist/src/utils/validation-schemas/index.d.cts +6 -0
- package/dist/src/utils/validation-schemas/index.d.ts +1 -1
- package/dist/src/utils/validation-schemas/index.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +54 -59
- package/dist/index.cjs.js +0 -2
- package/dist/index.cjs.js.map +0 -1
- package/dist/src/components/form/two-factor-challenge/otp-input.d.ts +0 -12
- package/dist/src/components/form/two-factor-challenge/otp-input.d.ts.map +0 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `useUpgrade` — the read side of the assurance-upgrade flow (§8.2, §13.3).
|
|
3
|
+
*
|
|
4
|
+
* It **reads `UpgradeContext` and installs nothing**. Installation belongs to
|
|
5
|
+
* `UpgradeProvider` and only to it: two hooks each installing a prompt handler
|
|
6
|
+
* would open two prompts and defeat single-flight.
|
|
7
|
+
*
|
|
8
|
+
* Outside an `UpgradeProvider` it returns `status: 'idle'` with no-op actions
|
|
9
|
+
* rather than throwing (§9.5 H8).
|
|
10
|
+
*/
|
|
11
|
+
import type { AssuranceBar, UpgradeChallenge, UpgradeFactor, UpgradeFactorType } from '@passflow/core';
|
|
12
|
+
import { type UpgradeElevateOptions, type UpgradeErrorStatusKind, type UpgradeHookState, type UpgradeSettledState } from '../context/upgrade-context.cjs';
|
|
13
|
+
export type UseUpgradeResult = {
|
|
14
|
+
/** True when an `UpgradeProvider` installed a prompt handler. */
|
|
15
|
+
enabled: boolean;
|
|
16
|
+
/** The whole state, as the discriminated union (§13.5's `UpgradeHookState`). */
|
|
17
|
+
state: UpgradeHookState;
|
|
18
|
+
/** The discriminant, for the common `status === 'challenged'` read. */
|
|
19
|
+
status: UpgradeHookState['status'];
|
|
20
|
+
/** What the server demanded — the MERGED requirement when challenges joined. */
|
|
21
|
+
challenge: UpgradeChallenge | null;
|
|
22
|
+
/** Usable factors, already ranked; index 0 is the suggested one. */
|
|
23
|
+
factors: readonly UpgradeFactor[];
|
|
24
|
+
/** The ranked factor types, which is what `UpgradeHookState.challenged` carries. */
|
|
25
|
+
factorTypes: readonly UpgradeFactorType[];
|
|
26
|
+
selectedFactor: UpgradeFactorType | null;
|
|
27
|
+
/**
|
|
28
|
+
* Elevated, and still not enough: the replay was re-challenged (§13.4).
|
|
29
|
+
* Non-null **only** in the `insufficient` state, and it never coexists with
|
|
30
|
+
* `status === 'success'` — this must not read as success.
|
|
31
|
+
*/
|
|
32
|
+
insufficient: {
|
|
33
|
+
obtained: AssuranceBar;
|
|
34
|
+
required: AssuranceBar;
|
|
35
|
+
} | null;
|
|
36
|
+
/** The terminal failure, in the `error` state only. */
|
|
37
|
+
error: Error | null;
|
|
38
|
+
/** Which failure class, in the `error` state only. */
|
|
39
|
+
errorKind: UpgradeErrorStatusKind | null;
|
|
40
|
+
/** The previous attempt's failure while the prompt is re-shown (a wrong code). */
|
|
41
|
+
previousError: Error | null;
|
|
42
|
+
/** True while a ceremony is on the wire. */
|
|
43
|
+
busy: boolean;
|
|
44
|
+
/** The factor-selection signal — §13.2's late-join boundary (T3). */
|
|
45
|
+
selectFactor: (factor: UpgradeFactorType) => void;
|
|
46
|
+
submit: (code?: string) => void;
|
|
47
|
+
cancel: () => void;
|
|
48
|
+
dismiss: () => void;
|
|
49
|
+
/** Resolves `null` on cancellation; otherwise the flight's terminal state. */
|
|
50
|
+
elevate: (options?: UpgradeElevateOptions) => Promise<UpgradeSettledState | null>;
|
|
51
|
+
};
|
|
52
|
+
export declare const useUpgrade: () => UseUpgradeResult;
|
|
53
|
+
//# sourceMappingURL=use-upgrade.d.ts.map
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* `useUpgrade` — the read side of the assurance-upgrade flow (§8.2, §13.3).
|
|
3
|
+
*
|
|
4
|
+
* It **reads `UpgradeContext` and installs nothing**. Installation belongs to
|
|
5
|
+
* `UpgradeProvider` and only to it: two hooks each installing a prompt handler
|
|
6
|
+
* would open two prompts and defeat single-flight.
|
|
7
|
+
*
|
|
8
|
+
* Outside an `UpgradeProvider` it returns `status: 'idle'` with no-op actions
|
|
9
|
+
* rather than throwing (§9.5 H8).
|
|
10
|
+
*/
|
|
11
|
+
import type { AssuranceBar, UpgradeChallenge, UpgradeFactor, UpgradeFactorType } from '@passflow/core';
|
|
12
|
+
import { type UpgradeElevateOptions, type UpgradeErrorStatusKind, type UpgradeHookState, type UpgradeSettledState } from '../context/upgrade-context.js';
|
|
3
13
|
export type UseUpgradeResult = {
|
|
4
14
|
/** True when an `UpgradeProvider` installed a prompt handler. */
|
|
5
15
|
enabled: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-upgrade.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-upgrade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"use-upgrade.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-upgrade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEvG,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EAErB,KAAK,mBAAmB,EACzB,MAAM,2BAA2B,CAAC;AAEnC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,iEAAiE;IACjE,OAAO,EAAE,OAAO,CAAC;IACjB,gFAAgF;IAChF,KAAK,EAAE,gBAAgB,CAAC;IACxB,uEAAuE;IACvE,MAAM,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACnC,gFAAgF;IAChF,SAAS,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACnC,oEAAoE;IACpE,OAAO,EAAE,SAAS,aAAa,EAAE,CAAC;IAClC,oFAAoF;IACpF,WAAW,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAC1C,cAAc,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACzC;;;;OAIG;IACH,YAAY,EAAE;QAAE,QAAQ,EAAE,YAAY,CAAC;QAAC,QAAQ,EAAE,YAAY,CAAA;KAAE,GAAG,IAAI,CAAC;IACxE,uDAAuD;IACvD,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,sDAAsD;IACtD,SAAS,EAAE,sBAAsB,GAAG,IAAI,CAAC;IACzC,kFAAkF;IAClF,aAAa,EAAE,KAAK,GAAG,IAAI,CAAC;IAC5B,4CAA4C;IAC5C,IAAI,EAAE,OAAO,CAAC;IACd,qEAAqE;IACrE,YAAY,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAClD,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,8EAA8E;IAC9E,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,qBAAqB,KAAK,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;CACnF,CAAC;AAOF,eAAO,MAAM,UAAU,QAAO,gBA2B7B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PassflowUserPasskey } from '@passflow/core';
|
|
2
|
+
export type UseUserPasskeysProps = () => {
|
|
3
|
+
data: PassflowUserPasskey[];
|
|
4
|
+
createUserPasskey: (relaingPartyId: string) => Promise<void>;
|
|
5
|
+
editUserPasskey: (newName: string, passkeyId: string) => Promise<void>;
|
|
6
|
+
deleteUserPasskey: (passkeyId: string) => Promise<void>;
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
isError: boolean;
|
|
9
|
+
errorMessage: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const useUserPasskeys: UseUserPasskeysProps;
|
|
12
|
+
//# sourceMappingURL=use-user-passkeys.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from '@passflow/core';
|
|
2
|
+
export * from './components/flow/index.cjs';
|
|
3
|
+
export * from './components/form/index.cjs';
|
|
4
|
+
export type { PassflowUpgradeOptions, UpgradeProviderProps } from './components/provider/index.cjs';
|
|
5
|
+
export { PassflowProvider, UpgradeProvider } from './components/provider/index.cjs';
|
|
6
|
+
export * from './components/ui/index.cjs';
|
|
7
|
+
export { INERT_UPGRADE_CONTEXT, UpgradeContext, type UpgradeContextValue, type UpgradeElevateOptions, type UpgradeErrorStatusKind, type UpgradeHookState, type UpgradePromptView, type UpgradeSettledState, } from './context/upgrade-context.cjs';
|
|
8
|
+
export * from './hooks/index.cjs';
|
|
9
|
+
export { attachAuth, withAuth } from './utils/upgrade-auth.cjs';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from './components/flow';
|
|
2
|
-
export * from './components/form';
|
|
3
|
-
export * from './components/ui';
|
|
4
|
-
export { PassflowProvider, UpgradeProvider } from './components/provider';
|
|
5
|
-
export type { UpgradeProviderProps, PassflowUpgradeOptions } from './components/provider';
|
|
6
|
-
export { UpgradeContext, INERT_UPGRADE_CONTEXT, type UpgradeContextValue, type UpgradeElevateOptions, type UpgradeErrorStatusKind, type UpgradeHookState, type UpgradePromptView, type UpgradeSettledState, } from './context/upgrade-context';
|
|
7
|
-
export { withAuth, attachAuth } from './utils/upgrade-auth';
|
|
8
|
-
export * from './hooks';
|
|
9
1
|
export * from '@passflow/core';
|
|
2
|
+
export * from './components/flow/index.js';
|
|
3
|
+
export * from './components/form/index.js';
|
|
4
|
+
export type { PassflowUpgradeOptions, UpgradeProviderProps } from './components/provider/index.js';
|
|
5
|
+
export { PassflowProvider, UpgradeProvider } from './components/provider/index.js';
|
|
6
|
+
export * from './components/ui/index.js';
|
|
7
|
+
export { INERT_UPGRADE_CONTEXT, UpgradeContext, type UpgradeContextValue, type UpgradeElevateOptions, type UpgradeErrorStatusKind, type UpgradeHookState, type UpgradePromptView, type UpgradeSettledState, } from './context/upgrade-context.js';
|
|
8
|
+
export * from './hooks/index.js';
|
|
9
|
+
export { attachAuth, withAuth } from './utils/upgrade-auth.js';
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,yBAAyB,CAAC;AAEjC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,yBAAyB,CAAC;AAEjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,YAAY,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC1F,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC1E,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GACzB,MAAM,2BAA2B,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type AuthErrorScope = 'form' | 'identity' | 'password' | 'credentials';
|
|
2
|
+
export type AuthUiError = {
|
|
3
|
+
message: string;
|
|
4
|
+
scope: AuthErrorScope;
|
|
5
|
+
};
|
|
6
|
+
export type AuthOperation = 'password' | 'passwordless' | 'passkey';
|
|
7
|
+
export type AuthFlow = 'sign-in' | 'sign-up';
|
|
8
|
+
//# sourceMappingURL=auth-errors.d.ts.map
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error taxonomy for the RFC 8628 device verification flow.
|
|
3
|
+
*
|
|
4
|
+
* ── The rule this file exists to enforce ────────────────────────────────────
|
|
5
|
+
* The person on this screen has just scanned a QR code with their phone and is
|
|
6
|
+
* deciding whether to hand a terminal a token. They are not debugging us. So:
|
|
7
|
+
*
|
|
8
|
+
* the message a user reads is NEVER a string we did not write for them.
|
|
9
|
+
*
|
|
10
|
+
* Not the browser's. Not the server's `error_description`. Not an exception's
|
|
11
|
+
* `.message`. Those are written for operators and they leak — the screen this
|
|
12
|
+
* taxonomy replaced did `err.message ?? 'Something went wrong'` and duly showed
|
|
13
|
+
* a real user:
|
|
14
|
+
*
|
|
15
|
+
* "Resident credentials or empty 'allowCredentials' lists are not
|
|
16
|
+
* supported at this time."
|
|
17
|
+
*
|
|
18
|
+
* — a Chrome/CDP internal, about a spec feature, in the middle of a sign-in.
|
|
19
|
+
*
|
|
20
|
+
* The technical string is not thrown away; it is just demoted. It rides along
|
|
21
|
+
* in `detail`, which the UI logs to the console and may offer behind a
|
|
22
|
+
* "details" affordance, and which the server also has in its own logs. Diagnosis
|
|
23
|
+
* keeps everything. The user keeps their sentence.
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* The closed set of things that can go wrong on the verification page, at the
|
|
27
|
+
* granularity a USER can act on.
|
|
28
|
+
*
|
|
29
|
+
* Deliberately coarser than the causes. Several distinct WebAuthn failures
|
|
30
|
+
* collapse into `passkey_failed` because the remedy is identical ("try again or
|
|
31
|
+
* use another method") and because the browser itself refuses to distinguish
|
|
32
|
+
* them — Chrome reports "you cancelled", "you timed out" and "there is no
|
|
33
|
+
* credential here" all as NotAllowedError, on purpose, so that a page cannot use
|
|
34
|
+
* the ceremony as an oracle for which accounts exist on a device. Inventing a
|
|
35
|
+
* finer story for the user than the browser told us would mean guessing.
|
|
36
|
+
*/
|
|
37
|
+
export type DeviceErrorType =
|
|
38
|
+
/** No user_code supplied yet — show the code entry form, not an error. */
|
|
39
|
+
'code_required'
|
|
40
|
+
/** The code is wrong, malformed, or names nothing. */
|
|
41
|
+
| 'code_invalid'
|
|
42
|
+
/** The code was real and has expired. */
|
|
43
|
+
| 'code_expired'
|
|
44
|
+
/** This request was already declined. */
|
|
45
|
+
| 'code_declined'
|
|
46
|
+
/** Already approved — the terminal already has what it needs. */
|
|
47
|
+
| 'code_already_approved'
|
|
48
|
+
/** RFC 8628 §5.1 budget spent. */
|
|
49
|
+
| 'too_many_attempts'
|
|
50
|
+
/** The app owner has this sign-in mode switched off. Renders the refusal. */
|
|
51
|
+
| 'mode_disabled'
|
|
52
|
+
/** The requesting app is gone, or its sign-in method is not configured. */
|
|
53
|
+
| 'app_unavailable'
|
|
54
|
+
/** Wrong email or password. */
|
|
55
|
+
| 'bad_credentials'
|
|
56
|
+
/** The form was submitted empty. */
|
|
57
|
+
| 'missing_credentials'
|
|
58
|
+
/** The second-factor code is wrong. */
|
|
59
|
+
| 'second_factor_invalid'
|
|
60
|
+
/** The second-factor form was submitted empty. */
|
|
61
|
+
| 'missing_second_factor'
|
|
62
|
+
/** The account is blocked. */
|
|
63
|
+
| 'account_blocked'
|
|
64
|
+
/** The passkey ceremony did not complete: cancelled, timed out, or none found. */
|
|
65
|
+
| 'passkey_failed'
|
|
66
|
+
/** This browser/authenticator cannot do this passkey sign-in at all. */
|
|
67
|
+
| 'passkey_unsupported'
|
|
68
|
+
/** We could not reach the server. */
|
|
69
|
+
| 'offline'
|
|
70
|
+
/** Anything else — including every technical failure the user cannot act on. */
|
|
71
|
+
| 'generic';
|
|
72
|
+
/**
|
|
73
|
+
* A classified failure: one sentence for the human, everything else for us.
|
|
74
|
+
*/
|
|
75
|
+
export type DeviceError = {
|
|
76
|
+
type: DeviceErrorType;
|
|
77
|
+
/**
|
|
78
|
+
* Plain, human, safe to render. Written by us, for this screen. Never
|
|
79
|
+
* interpolated from an exception or a server description.
|
|
80
|
+
*/
|
|
81
|
+
message: string;
|
|
82
|
+
/**
|
|
83
|
+
* The technical string — an exception message, a server `error_description`,
|
|
84
|
+
* a DOMException name. For the console, a collapsed details affordance, and
|
|
85
|
+
* bug reports. MUST NOT be shown as the primary message.
|
|
86
|
+
*/
|
|
87
|
+
detail?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Whether trying again on this page could plausibly work. Drives whether a
|
|
90
|
+
* retry control is offered: `false` means the page must not invite the user
|
|
91
|
+
* to bang on it (an expired code will never become unexpired here).
|
|
92
|
+
*/
|
|
93
|
+
isRecoverable: boolean;
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=device-errors.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type PreferIdentity = 'identity' | 'phone' | 'none';
|
|
2
|
+
export type DefaultMethod = 'email_or_username' | 'phone';
|
|
3
|
+
export type PreferChallenge = 'passkey' | 'password' | 'otp' | 'magic_link';
|
|
4
|
+
export type SuccessAuthRedirect = string;
|
|
5
|
+
export type { RegisteredTwoFactorMethod, TwoFactorChallengeResponse, TwoFactorMethod, TwoFactorVerifyRequestV2, TwoFactorVerifyResponseV2, } from '@passflow/core';
|
|
6
|
+
export type { AuthErrorScope, AuthFlow, AuthOperation, AuthUiError } from './auth-errors.cjs';
|
|
7
|
+
export type { DeviceError, DeviceErrorType } from './device-errors.cjs';
|
|
8
|
+
export type { TwoFactorError, TwoFactorErrorType } from './two-factor-errors.cjs';
|
|
9
|
+
export interface UseTwoFactorChallengeReturn {
|
|
10
|
+
challenge: import('@passflow/core').TwoFactorChallengeResponse | null;
|
|
11
|
+
isLoading: boolean;
|
|
12
|
+
error: Error | null;
|
|
13
|
+
requestChallenge: (firstFactorMethod?: string) => Promise<void>;
|
|
14
|
+
verify: (response: string, trustDevice?: boolean) => Promise<void>;
|
|
15
|
+
switchMethod: (method: import('@passflow/core').TwoFactorMethod) => Promise<void>;
|
|
16
|
+
selectedMethod: import('@passflow/core').TwoFactorMethod | null;
|
|
17
|
+
}
|
|
18
|
+
export interface UseTwoFactorMethodsReturn {
|
|
19
|
+
availableMethods: import('@passflow/core').TwoFactorMethod[];
|
|
20
|
+
registeredMethods: import('@passflow/core').RegisteredTwoFactorMethod[];
|
|
21
|
+
isLoading: boolean;
|
|
22
|
+
error: Error | null;
|
|
23
|
+
refresh: () => Promise<void>;
|
|
24
|
+
removeMethod: (methodId: string) => Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -2,10 +2,10 @@ export type PreferIdentity = 'identity' | 'phone' | 'none';
|
|
|
2
2
|
export type DefaultMethod = 'email_or_username' | 'phone';
|
|
3
3
|
export type PreferChallenge = 'passkey' | 'password' | 'otp' | 'magic_link';
|
|
4
4
|
export type SuccessAuthRedirect = string;
|
|
5
|
-
export type {
|
|
6
|
-
export type {
|
|
7
|
-
export type {
|
|
8
|
-
export type {
|
|
5
|
+
export type { RegisteredTwoFactorMethod, TwoFactorChallengeResponse, TwoFactorMethod, TwoFactorVerifyRequestV2, TwoFactorVerifyResponseV2, } from '@passflow/core';
|
|
6
|
+
export type { AuthErrorScope, AuthFlow, AuthOperation, AuthUiError } from './auth-errors.js';
|
|
7
|
+
export type { DeviceError, DeviceErrorType } from './device-errors.js';
|
|
8
|
+
export type { TwoFactorError, TwoFactorErrorType } from './two-factor-errors.js';
|
|
9
9
|
export interface UseTwoFactorChallengeReturn {
|
|
10
10
|
challenge: import('@passflow/core').TwoFactorChallengeResponse | null;
|
|
11
11
|
isLoading: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,CAAC;AAE3D,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,OAAO,CAAC;AAE1D,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,UAAU,GAAG,KAAK,GAAG,YAAY,CAAC;AAE5E,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,CAAC;AAE3D,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,OAAO,CAAC;AAE1D,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,UAAU,GAAG,KAAK,GAAG,YAAY,CAAC;AAE5E,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAGzC,YAAY,EACV,yBAAyB,EACzB,0BAA0B,EAC1B,eAAe,EACf,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC1F,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACpE,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAG9E,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,OAAO,gBAAgB,EAAE,0BAA0B,GAAG,IAAI,CAAC;IACtE,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,gBAAgB,EAAE,CAAC,iBAAiB,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,MAAM,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnE,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,gBAAgB,EAAE,eAAe,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAClF,cAAc,EAAE,OAAO,gBAAgB,EAAE,eAAe,GAAG,IAAI,CAAC;CACjE;AAED,MAAM,WAAW,yBAAyB;IACxC,gBAAgB,EAAE,OAAO,gBAAgB,EAAE,eAAe,EAAE,CAAC;IAC7D,iBAAiB,EAAE,OAAO,gBAAgB,EAAE,yBAAyB,EAAE,CAAC;IACxE,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACnD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types of 2FA errors with different handling strategies
|
|
3
|
+
*/
|
|
4
|
+
export type TwoFactorErrorType = 'expired' | 'not_enabled' | 'invalid_code' | 'generic';
|
|
5
|
+
/**
|
|
6
|
+
* Structured error information for 2FA errors
|
|
7
|
+
*/
|
|
8
|
+
export type TwoFactorError = {
|
|
9
|
+
type: TwoFactorErrorType;
|
|
10
|
+
message: string;
|
|
11
|
+
isRecoverable: boolean;
|
|
12
|
+
shouldAutoRedirect: boolean;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=two-factor-errors.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AuthFlow, AuthOperation, AuthUiError } from '../types/index.cjs';
|
|
2
|
+
export declare const authRedirectErrorMessage = "We couldn't continue this authentication request. Return to the app and try again.";
|
|
3
|
+
export declare const verificationLinkErrorMessage = "This verification link is invalid or incomplete. Request a new link or code and try again.";
|
|
4
|
+
export declare const invitationLinkErrorMessage = "This invitation link is invalid or has expired.";
|
|
5
|
+
export declare const verificationRequestErrorMessage = "This verification request is no longer available. Start again to request a new link or code.";
|
|
6
|
+
export declare const authErrorFor: (flow: AuthFlow, operation: AuthOperation) => AuthUiError;
|
|
7
|
+
//# sourceMappingURL=auth-error.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthFlow, AuthOperation, AuthUiError } from '../types';
|
|
1
|
+
import type { AuthFlow, AuthOperation, AuthUiError } from '../types/index.js';
|
|
2
2
|
export declare const authRedirectErrorMessage = "We couldn't continue this authentication request. Return to the app and try again.";
|
|
3
3
|
export declare const verificationLinkErrorMessage = "This verification link is invalid or incomplete. Request a new link or code and try again.";
|
|
4
4
|
export declare const invitationLinkErrorMessage = "This invitation link is invalid or has expired.";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-error.d.ts","sourceRoot":"","sources":["../../../src/utils/auth-error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAiCpE,eAAO,MAAM,wBAAwB,uFAAuF,CAAC;AAE7H,eAAO,MAAM,4BAA4B,+FACqD,CAAC;AAE/F,eAAO,MAAM,0BAA0B,oDAAoD,CAAC;AAE5F,eAAO,MAAM,+BAA+B,iGACoD,CAAC;AAEjG,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"auth-error.d.ts","sourceRoot":"","sources":["../../../src/utils/auth-error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAiCpE,eAAO,MAAM,wBAAwB,uFAAuF,CAAC;AAE7H,eAAO,MAAM,4BAA4B,+FACqD,CAAC;AAE/F,eAAO,MAAM,0BAA0B,oDAAoD,CAAC;AAE5F,eAAO,MAAM,+BAA+B,iGACoD,CAAC;AAEjG,eAAO,MAAM,YAAY,SAAU,QAAQ,aAAa,aAAa,KAAG,WAA+C,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { DeviceError, DeviceErrorType } from '../types/device-errors.cjs';
|
|
2
|
+
/**
|
|
3
|
+
* An error carrying a server-supplied reason code. Thrown by the device API
|
|
4
|
+
* client so the classifier can map precisely rather than sniff strings.
|
|
5
|
+
*/
|
|
6
|
+
export declare class DeviceApiError extends Error {
|
|
7
|
+
/** Stable machine reason from the server. */
|
|
8
|
+
readonly reason: string;
|
|
9
|
+
/** The OAuth2 error code (`invalid_request`, `unauthorized_client`, ...). */
|
|
10
|
+
readonly code: string;
|
|
11
|
+
/** HTTP status. */
|
|
12
|
+
readonly status: number;
|
|
13
|
+
constructor(params: {
|
|
14
|
+
reason: string;
|
|
15
|
+
code: string;
|
|
16
|
+
status: number;
|
|
17
|
+
description: string;
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Classify any failure from the device verification flow.
|
|
22
|
+
*
|
|
23
|
+
* Order matters: the server's own reason wins when we have one (it knows more
|
|
24
|
+
* than we can infer), then WebAuthn's message text, then WebAuthn's name, then
|
|
25
|
+
* the network, then a safe default. Every path ends in copy from
|
|
26
|
+
* DEVICE_ERROR_COPY — there is deliberately no branch that forwards a raw
|
|
27
|
+
* string to `message`.
|
|
28
|
+
*/
|
|
29
|
+
export declare function classifyDeviceError(err: unknown): DeviceError;
|
|
30
|
+
/**
|
|
31
|
+
* The copy for a type, without an error to classify. For states that are known
|
|
32
|
+
* up front rather than thrown — e.g. a browser with no WebAuthn at all.
|
|
33
|
+
*/
|
|
34
|
+
export declare function deviceErrorOfType(type: DeviceErrorType, detail?: string): DeviceError;
|
|
35
|
+
//# sourceMappingURL=classify-device-error.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DeviceError, DeviceErrorType } from '../types/device-errors';
|
|
1
|
+
import type { DeviceError, DeviceErrorType } from '../types/device-errors.js';
|
|
2
2
|
/**
|
|
3
3
|
* An error carrying a server-supplied reason code. Thrown by the device API
|
|
4
4
|
* client so the classifier can map precisely rather than sniff strings.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classify-device-error.d.ts","sourceRoot":"","sources":["../../../src/utils/classify-device-error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AA+I1E;;;GAGG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC,6CAA6C;IAC7C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,6EAA6E;IAC7E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,mBAAmB;IACnB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"classify-device-error.d.ts","sourceRoot":"","sources":["../../../src/utils/classify-device-error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AA+I1E;;;GAGG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC,6CAA6C;IAC7C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,6EAA6E;IAC7E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,mBAAmB;IACnB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,YAAY,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,EAQxF;CACF;AAYD;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,WAAW,CAmC7D;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,eAAe,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,WAAW,CAErF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { TwoFactorError } from '../types/two-factor-errors.cjs';
|
|
2
|
+
/**
|
|
3
|
+
* Classify 2FA error based on error message
|
|
4
|
+
*
|
|
5
|
+
* @param errorMessage - Error message from SDK
|
|
6
|
+
* @returns Classified error with handling strategy
|
|
7
|
+
*/
|
|
8
|
+
export declare function classifyTwoFactorError(errorMessage: string): TwoFactorError;
|
|
9
|
+
/**
|
|
10
|
+
* Get user-friendly error message based on error type
|
|
11
|
+
*/
|
|
12
|
+
export declare function getUserFriendlyErrorMessage(error: TwoFactorError): string;
|
|
13
|
+
//# sourceMappingURL=classify-two-factor-error.d.ts.map
|
package/dist/src/utils/cn.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../../src/utils/cn.ts"],"names":[],"mappings":"AAAA,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAG7C,eAAO,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../../src/utils/cn.ts"],"names":[],"mappings":"AAAA,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAG7C,eAAO,MAAM,EAAE,eAAgB,UAAU,EAAE,WAA2B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const stringByFields: {
|
|
2
|
+
last_used: string;
|
|
3
|
+
default: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const formatDateToString: (date: Date | string, format: string) => string;
|
|
6
|
+
export declare const usedFieldString: (date: Date | string, field: keyof typeof stringByFields) => string;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=format.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../src/utils/dayjs/format.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../src/utils/dayjs/format.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,cAAc;IAClB,SAAS;IACT,OAAO;CACR,CAAC;AAEF,eAAO,MAAM,kBAAkB,SAAU,IAAI,GAAG,MAAM,UAAU,MAAM,KAAG,MAAoC,CAAC;AAC9G,eAAO,MAAM,eAAe,SAAU,IAAI,GAAG,MAAM,SAAS,MAAM,OAAO,cAAc,KAAG,MAOzF,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './format';
|
|
1
|
+
export * from './format.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { AuthStrategies, Providers } from '@passflow/core';
|
|
2
|
+
export type AuthMethods = {
|
|
3
|
+
internal: {
|
|
4
|
+
username: {
|
|
5
|
+
password: boolean;
|
|
6
|
+
};
|
|
7
|
+
email: {
|
|
8
|
+
password: boolean;
|
|
9
|
+
otp: boolean;
|
|
10
|
+
magicLink: boolean;
|
|
11
|
+
};
|
|
12
|
+
phone: {
|
|
13
|
+
password: boolean;
|
|
14
|
+
otp: boolean;
|
|
15
|
+
magicLink: boolean;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
fim: {
|
|
19
|
+
providers: Providers[];
|
|
20
|
+
};
|
|
21
|
+
passkey: boolean;
|
|
22
|
+
hasEmailMethods: boolean;
|
|
23
|
+
hasSignInEmailMethods: boolean;
|
|
24
|
+
hasPhoneMethods: boolean;
|
|
25
|
+
hasSignInPhoneMethods: boolean;
|
|
26
|
+
hasUsernameMethods: boolean;
|
|
27
|
+
hasSignInUsernameMethods: boolean;
|
|
28
|
+
};
|
|
29
|
+
export declare const getAuthMethods: (strategies?: AuthStrategies[]) => AuthMethods;
|
|
30
|
+
//# sourceMappingURL=get-auth-methods.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-auth-methods.d.ts","sourceRoot":"","sources":["../../../src/utils/get-auth-methods.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAiC,SAAS,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"get-auth-methods.d.ts","sourceRoot":"","sources":["../../../src/utils/get-auth-methods.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAiC,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAK/F,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE;QACR,QAAQ,EAAE;YACR,QAAQ,EAAE,OAAO,CAAC;SACnB,CAAC;QACF,KAAK,EAAE;YACL,QAAQ,EAAE,OAAO,CAAC;YAClB,GAAG,EAAE,OAAO,CAAC;YACb,SAAS,EAAE,OAAO,CAAC;SACpB,CAAC;QACF,KAAK,EAAE;YACL,QAAQ,EAAE,OAAO,CAAC;YAClB,GAAG,EAAE,OAAO,CAAC;YACb,SAAS,EAAE,OAAO,CAAC;SACpB,CAAC;KACH,CAAC;IACF,GAAG,EAAE;QACH,SAAS,EAAE,SAAS,EAAE,CAAC;KACxB,CAAC;IACF,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,OAAO,CAAC;IACzB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,eAAe,EAAE,OAAO,CAAC;IACzB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,wBAAwB,EAAE,OAAO,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,cAAc,gBAAiB,cAAc,EAAE,KAAG,WA8E9D,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { InternalStrategyChallenge } from '@passflow/core';
|
|
2
|
+
import type { DefaultMethod } from '../types/index.cjs';
|
|
3
|
+
import type { AuthMethods } from './get-auth-methods.cjs';
|
|
4
|
+
export declare const getIdentityLabel: (methods: AuthMethods, type: 'label' | 'button') => "Email" | "Email or username" | "Use email" | "Use email or username" | "Use username" | "Username" | null;
|
|
5
|
+
export declare const getPasswordlessData: (methods: AuthMethods, currentMethod: DefaultMethod | null) => {
|
|
6
|
+
label: string;
|
|
7
|
+
challengeType: InternalStrategyChallenge;
|
|
8
|
+
} | null;
|
|
9
|
+
export declare const getValidationErrorsLabel: (methods: AuthMethods) => "Email is required" | "Email or username is required" | "Field is required" | "Username is required";
|
|
10
|
+
//# sourceMappingURL=get-form-labels.d.ts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { AuthMethods } from './get-auth-methods';
|
|
4
|
-
export declare const getIdentityLabel: (methods: AuthMethods, type:
|
|
1
|
+
import type { InternalStrategyChallenge } from '@passflow/core';
|
|
2
|
+
import type { DefaultMethod } from '../types/index.js';
|
|
3
|
+
import type { AuthMethods } from './get-auth-methods.js';
|
|
4
|
+
export declare const getIdentityLabel: (methods: AuthMethods, type: 'label' | 'button') => "Email" | "Email or username" | "Use email" | "Use email or username" | "Use username" | "Username" | null;
|
|
5
5
|
export declare const getPasswordlessData: (methods: AuthMethods, currentMethod: DefaultMethod | null) => {
|
|
6
6
|
label: string;
|
|
7
7
|
challengeType: InternalStrategyChallenge;
|
|
8
8
|
} | null;
|
|
9
|
-
export declare const getValidationErrorsLabel: (methods: AuthMethods) => "Email
|
|
9
|
+
export declare const getValidationErrorsLabel: (methods: AuthMethods) => "Email is required" | "Email or username is required" | "Field is required" | "Username is required";
|
|
10
10
|
//# sourceMappingURL=get-form-labels.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-form-labels.d.ts","sourceRoot":"","sources":["../../../src/utils/get-form-labels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"get-form-labels.d.ts","sourceRoot":"","sources":["../../../src/utils/get-form-labels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAGhE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAItD,eAAO,MAAM,gBAAgB,YAAa,WAAW,QAAQ,OAAO,GAAG,QAAQ,+GAO9E,CAAC;AAEF,eAAO,MAAM,mBAAmB,YACrB,WAAW,iBACL,aAAa,GAAG,IAAI,KAClC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,yBAAyB,CAAA;CAAE,GAAG,IAYhE,CAAC;AAEF,eAAO,MAAM,wBAAwB,YAAa,WAAW,yGAM5D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-url-errors.d.ts","sourceRoot":"","sources":["../../../src/utils/get-url-errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"get-url-errors.d.ts","sourceRoot":"","sources":["../../../src/utils/get-url-errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,YAAa,MAAM;;;CAM3C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Passflow } from '@passflow/core';
|
|
1
|
+
import type { Passflow } from '@passflow/core';
|
|
2
2
|
export type TokenUrlFormat = 'query' | 'hash';
|
|
3
3
|
export declare const getUrlWithTokens: (passflow: Passflow, url: string, format?: TokenUrlFormat) => Promise<string>;
|
|
4
4
|
//# sourceMappingURL=get-url-with-tokens.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-url-with-tokens.d.ts","sourceRoot":"","sources":["../../../src/utils/get-url-with-tokens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,CAAC;AAE9C,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"get-url-with-tokens.d.ts","sourceRoot":"","sources":["../../../src/utils/get-url-with-tokens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,CAAC;AAE9C,eAAO,MAAM,gBAAgB,aAAoB,QAAQ,OAAO,MAAM,WAAU,cAAc,KAAY,OAAO,CAAC,MAAM,CAmBvH,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { authErrorFor, authRedirectErrorMessage, invitationLinkErrorMessage, verificationLinkErrorMessage, verificationRequestErrorMessage, } from './auth-error.cjs';
|
|
2
|
+
export { classifyDeviceError, DeviceApiError, deviceErrorOfType } from './classify-device-error.cjs';
|
|
3
|
+
export { classifyTwoFactorError, getUserFriendlyErrorMessage } from './classify-two-factor-error.cjs';
|
|
4
|
+
export { cn } from './cn.cjs';
|
|
5
|
+
export * from './dayjs/index.cjs';
|
|
6
|
+
export { type AuthMethods, getAuthMethods } from './get-auth-methods.cjs';
|
|
7
|
+
export { getIdentityLabel, getPasswordlessData, getValidationErrorsLabel } from './get-form-labels.cjs';
|
|
8
|
+
export { getUrlErrors } from './get-url-errors.cjs';
|
|
9
|
+
export { getUrlWithTokens, type TokenUrlFormat } from './get-url-with-tokens.cjs';
|
|
10
|
+
export { getInvitationAuthChrome, type InvitationAuthIntent } from './invitation-auth-chrome.cjs';
|
|
11
|
+
export { routeToSecondFactor, urlCarriesTwoFactorToken } from './second-factor.cjs';
|
|
12
|
+
export { TwoFactorLoopPrevention } from './two-factor-loop-prevention.cjs';
|
|
13
|
+
export { undefinedOnCatch } from './undefined-on-catch.cjs';
|
|
14
|
+
export { attachAuth, registerUpgradeAuthInstance, releaseUpgradeAuthInstance, upgradeAuthInstance, withAuth, } from './upgrade-auth.cjs';
|
|
15
|
+
export { useUrlParams } from './url-params.cjs';
|
|
16
|
+
export { isValidUrl } from './validate-url.cjs';
|
|
17
|
+
export * from './validation-schemas/index.cjs';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|