authhero 5.8.1 → 5.9.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/dist/assets/u/widget/index.esm.js +1 -1
- package/dist/authhero.cjs +97 -97
- package/dist/authhero.d.ts +17622 -72311
- package/dist/authhero.mjs +5587 -5593
- package/dist/stats.html +1 -1
- package/dist/tsconfig.types.tsbuildinfo +1 -0
- package/dist/types/adapters/cache/in-memory.d.ts +52 -0
- package/dist/types/adapters/cache/index.d.ts +2 -0
- package/dist/types/adapters/index.d.ts +1 -0
- package/dist/types/authentication-flows/auth0-migration.d.ts +53 -0
- package/dist/types/authentication-flows/authorization-code.d.ts +23 -0
- package/dist/types/authentication-flows/client-credentials.d.ts +16 -0
- package/dist/types/authentication-flows/common.d.ts +253 -0
- package/dist/types/authentication-flows/connection.d.ts +17 -0
- package/dist/types/authentication-flows/mfa.d.ts +49 -0
- package/dist/types/authentication-flows/passkey-enrollment.d.ts +19 -0
- package/dist/types/authentication-flows/password.d.ts +24 -0
- package/dist/types/authentication-flows/passwordless.d.ts +571 -0
- package/dist/types/authentication-flows/refresh-token-migration.d.ts +17 -0
- package/dist/types/authentication-flows/refresh-token.d.ts +15 -0
- package/dist/types/authentication-flows/resume.d.ts +22 -0
- package/dist/types/authentication-flows/silent.d.ts +25 -0
- package/dist/types/authentication-flows/ticket.d.ts +7 -0
- package/dist/types/authentication-flows/try-connection.d.ts +33 -0
- package/dist/types/authentication-flows/universal.d.ts +19 -0
- package/dist/types/build-hash.d.ts +7 -0
- package/dist/types/client/client-bundle.d.ts +1 -0
- package/dist/types/client/form-handler.d.ts +9 -0
- package/dist/types/client/incognito-handler.d.ts +5 -0
- package/dist/types/client/index.d.ts +1 -0
- package/dist/types/client/input-otp.d.ts +12 -0
- package/dist/types/client/password-toggle.d.ts +10 -0
- package/dist/types/client/user-agent-detector.d.ts +22 -0
- package/dist/types/components/AccountChangeEmailPage.d.ts +14 -0
- package/dist/types/components/AccountForm.d.ts +17 -0
- package/dist/types/components/AccountPage.d.ts +15 -0
- package/dist/types/components/AppLogo.d.ts +8 -0
- package/dist/types/components/AuthLayout.d.ts +18 -0
- package/dist/types/components/Button.d.ts +12 -0
- package/dist/types/components/ChangeEmailForm.d.ts +14 -0
- package/dist/types/components/ChangeEmailPage.d.ts +15 -0
- package/dist/types/components/ContinueForm.d.ts +13 -0
- package/dist/types/components/EmailValidatedForm.d.ts +12 -0
- package/dist/types/components/EmailValidatedPage.d.ts +11 -0
- package/dist/types/components/EnterCodeForm.d.ts +13 -0
- package/dist/types/components/EnterCodePage.d.ts +14 -0
- package/dist/types/components/EnterPasswordForm.d.ts +14 -0
- package/dist/types/components/EnterPasswordPage.d.ts +13 -0
- package/dist/types/components/ErrorMessage.d.ts +6 -0
- package/dist/types/components/Footer.d.ts +9 -0
- package/dist/types/components/ForgotPasswordForm.d.ts +14 -0
- package/dist/types/components/ForgotPasswordPage.d.ts +13 -0
- package/dist/types/components/ForgotPasswordSentPage.d.ts +11 -0
- package/dist/types/components/Form.d.ts +6 -0
- package/dist/types/components/FormNodePage.d.ts +16 -0
- package/dist/types/components/GoBack.d.ts +5 -0
- package/dist/types/components/GoogleLogo.d.ts +4 -0
- package/dist/types/components/Icon.d.ts +8 -0
- package/dist/types/components/IconEye.d.ts +8 -0
- package/dist/types/components/IconEyeSlash.d.ts +8 -0
- package/dist/types/components/IconPen.d.ts +7 -0
- package/dist/types/components/IdentifierForm.d.ts +16 -0
- package/dist/types/components/IdentifierPage.d.ts +15 -0
- package/dist/types/components/ImpersonateForm.d.ts +14 -0
- package/dist/types/components/ImpersonationPage.d.ts +13 -0
- package/dist/types/components/InvalidSessionPage.d.ts +11 -0
- package/dist/types/components/Layout.d.ts +11 -0
- package/dist/types/components/LoginForm.d.ts +15 -0
- package/dist/types/components/MessagePage.d.ts +13 -0
- package/dist/types/components/PasswordInput.d.ts +6 -0
- package/dist/types/components/PreSignUpConfirmationPage.d.ts +12 -0
- package/dist/types/components/PreSignUpPage.d.ts +12 -0
- package/dist/types/components/ResetPasswordForm.d.ts +14 -0
- package/dist/types/components/ResetPasswordPage.d.ts +12 -0
- package/dist/types/components/SignUpForm.d.ts +15 -0
- package/dist/types/components/SignUpPage.d.ts +14 -0
- package/dist/types/components/SocialButton.d.ts +10 -0
- package/dist/types/components/Spinner.d.ts +6 -0
- package/dist/types/components/Trans.d.ts +8 -0
- package/dist/types/components/UnverifiedEmailPage.d.ts +11 -0
- package/dist/types/components/UserNotFoundPage.d.ts +12 -0
- package/dist/types/components/VippsLogo.d.ts +4 -0
- package/dist/types/components/index.d.ts +34 -0
- package/dist/types/components/stories/AccountForm.stories.d.ts +13 -0
- package/dist/types/components/stories/AuthLayout.stories.d.ts +27 -0
- package/dist/types/components/stories/ChangeEmailForm.stories.d.ts +11 -0
- package/dist/types/components/stories/ContinueForm.stories.d.ts +10 -0
- package/dist/types/components/stories/EnterCodeForm.stories.d.ts +9 -0
- package/dist/types/components/stories/EnterPasswordForm.stories.d.ts +22 -0
- package/dist/types/components/stories/IdentifierForm.stories.d.ts +42 -0
- package/dist/types/components/stories/IdentifierPage.stories.d.ts +33 -0
- package/dist/types/components/stories/ImpersonateForm.stories.d.ts +11 -0
- package/dist/types/components/stories/LoginForm.stories.d.ts +12 -0
- package/dist/types/components/ui/button.d.ts +12 -0
- package/dist/types/components/ui/card.d.ts +30 -0
- package/dist/types/components/ui/input-otp.d.ts +31 -0
- package/dist/types/components/ui/input.d.ts +15 -0
- package/dist/types/components/ui/label.d.ts +9 -0
- package/dist/types/constants/defaultBranding.d.ts +2 -0
- package/dist/types/constants/defaultTheme.d.ts +2 -0
- package/dist/types/constants/index.d.ts +2 -0
- package/dist/types/constants.d.ts +15 -0
- package/dist/types/email-services/index.d.ts +3 -0
- package/dist/types/email-services/mailgun.d.ts +18 -0
- package/dist/types/email-services/postmark.d.ts +14 -0
- package/dist/types/email-services/resend.d.ts +14 -0
- package/dist/types/emails/defaults/Layout.d.ts +12 -0
- package/dist/types/emails/defaults/PrimaryButton.d.ts +11 -0
- package/dist/types/emails/defaults/ResetEmail.d.ts +1 -0
- package/dist/types/emails/defaults/ResetEmailByCode.d.ts +1 -0
- package/dist/types/emails/defaults/UserInvitation.d.ts +1 -0
- package/dist/types/emails/defaults/VerifyEmail.d.ts +1 -0
- package/dist/types/emails/defaults/VerifyEmailByCode.d.ts +1 -0
- package/dist/types/emails/defaults/WelcomeEmail.d.ts +1 -0
- package/dist/types/emails/defaults/compiled.d.ts +2 -0
- package/dist/types/emails/defaults/index.d.ts +6 -0
- package/dist/types/emails/defaults/subjects.d.ts +2 -0
- package/dist/types/emails/index.d.ts +70 -0
- package/dist/types/emails/render.d.ts +41 -0
- package/dist/types/errors/is-unique-constraint-error.d.ts +8 -0
- package/dist/types/errors/json-http-exception.d.ts +5 -0
- package/dist/types/errors/redirect-exception.d.ts +6 -0
- package/dist/types/generated/locale-types.d.ts +690 -0
- package/dist/types/helpers/cache-wrapper.d.ts +23 -0
- package/dist/types/helpers/client-assertion.d.ts +49 -0
- package/dist/types/helpers/client-keys.d.ts +27 -0
- package/dist/types/helpers/client.d.ts +496 -0
- package/dist/types/helpers/dcr/constraint-enforcement.d.ts +24 -0
- package/dist/types/helpers/dcr/metadata-mapping.d.ts +83 -0
- package/dist/types/helpers/dcr/mint-iat.d.ts +14 -0
- package/dist/types/helpers/dcr/mint-token.d.ts +7 -0
- package/dist/types/helpers/dcr/validate-connect-origin.d.ts +20 -0
- package/dist/types/helpers/dcr/verify-token.d.ts +8 -0
- package/dist/types/helpers/default-destinations.d.ts +55 -0
- package/dist/types/helpers/entity-hooks-wrapper.d.ts +43 -0
- package/dist/types/helpers/hook-events.d.ts +20 -0
- package/dist/types/helpers/hook-user-payload.d.ts +8 -0
- package/dist/types/helpers/hrd.d.ts +3 -0
- package/dist/types/helpers/logging.d.ts +65 -0
- package/dist/types/helpers/outbox-cleanup.d.ts +10 -0
- package/dist/types/helpers/outbox-destinations/index.d.ts +2 -0
- package/dist/types/helpers/outbox-destinations/log-streams.d.ts +66 -0
- package/dist/types/helpers/outbox-destinations/logs.d.ts +20 -0
- package/dist/types/helpers/outbox-destinations/registration-finalizer.d.ts +29 -0
- package/dist/types/helpers/outbox-destinations/webhooks.d.ts +57 -0
- package/dist/types/helpers/outbox-relay.d.ts +34 -0
- package/dist/types/helpers/password-policy.d.ts +54 -0
- package/dist/types/helpers/request-object.d.ts +40 -0
- package/dist/types/helpers/run-outbox-relay.d.ts +58 -0
- package/dist/types/helpers/saml.d.ts +1 -0
- package/dist/types/helpers/scope-claims.d.ts +4 -0
- package/dist/types/helpers/scopes-permissions.d.ts +38 -0
- package/dist/types/helpers/server-timing.d.ts +12 -0
- package/dist/types/helpers/service-token.d.ts +54 -0
- package/dist/types/helpers/set-tenant-id.d.ts +15 -0
- package/dist/types/helpers/signing-keys.d.ts +16 -0
- package/dist/types/helpers/try-connection-client.d.ts +15 -0
- package/dist/types/helpers/user-linking.d.ts +14 -0
- package/dist/types/helpers/user-session-cleanup.d.ts +21 -0
- package/dist/types/helpers/users.d.ts +46 -0
- package/dist/types/helpers/wait-until.d.ts +21 -0
- package/dist/types/hooks/addDataHooks.d.ts +16 -0
- package/dist/types/hooks/code-executor/local.d.ts +13 -0
- package/dist/types/hooks/codehooks.d.ts +70 -0
- package/dist/types/hooks/formhooks.d.ts +99 -0
- package/dist/types/hooks/helpers/token-api.d.ts +17 -0
- package/dist/types/hooks/index.d.ts +20 -0
- package/dist/types/hooks/link-users.d.ts +29 -0
- package/dist/types/hooks/pagehooks.d.ts +16 -0
- package/dist/types/hooks/post-user-login.d.ts +29 -0
- package/dist/types/hooks/pre-defined/account-linking.d.ts +73 -0
- package/dist/types/hooks/pre-defined/ensure-username.d.ts +86 -0
- package/dist/types/hooks/pre-defined/index.d.ts +23 -0
- package/dist/types/hooks/pre-defined/set-preferred-username.d.ts +26 -0
- package/dist/types/hooks/templatehooks.d.ts +29 -0
- package/dist/types/hooks/user-deletion.d.ts +14 -0
- package/dist/types/hooks/user-registration.d.ts +88 -0
- package/dist/types/hooks/user-update.d.ts +16 -0
- package/dist/types/hooks/validate-signup.d.ts +34 -0
- package/dist/types/hooks/webhooks.d.ts +35 -0
- package/dist/types/i18n/index.d.ts +77 -0
- package/dist/types/index.d.ts +15791 -0
- package/dist/types/locales/index.d.ts +9 -0
- package/dist/types/middlewares/apply-config.d.ts +14 -0
- package/dist/types/middlewares/authentication.d.ts +26 -0
- package/dist/types/middlewares/client-info.d.ts +8 -0
- package/dist/types/middlewares/index.d.ts +6 -0
- package/dist/types/middlewares/outbox.d.ts +24 -0
- package/dist/types/middlewares/register-component.d.ts +10 -0
- package/dist/types/middlewares/tenant.d.ts +12 -0
- package/dist/types/migration-providers/auth0.d.ts +3 -0
- package/dist/types/migration-providers/index.d.ts +5 -0
- package/dist/types/migration-providers/types.d.ts +32 -0
- package/dist/types/routes/auth-api/account.d.ts +36 -0
- package/dist/types/routes/auth-api/authenticate.d.ts +31 -0
- package/dist/types/routes/auth-api/authorize.d.ts +239 -0
- package/dist/types/routes/auth-api/callback.d.ts +234 -0
- package/dist/types/routes/auth-api/connect-start.d.ts +52 -0
- package/dist/types/routes/auth-api/dbconnections.d.ts +43 -0
- package/dist/types/routes/auth-api/index.d.ts +1580 -0
- package/dist/types/routes/auth-api/logout.d.ts +20 -0
- package/dist/types/routes/auth-api/oidc-logout.d.ts +52 -0
- package/dist/types/routes/auth-api/passwordless.d.ts +154 -0
- package/dist/types/routes/auth-api/register/index.d.ts +159 -0
- package/dist/types/routes/auth-api/register/shared.d.ts +30 -0
- package/dist/types/routes/auth-api/revoke.d.ts +73 -0
- package/dist/types/routes/auth-api/token.d.ts +412 -0
- package/dist/types/routes/auth-api/userinfo.d.ts +84 -0
- package/dist/types/routes/auth-api/well-known.d.ts +74 -0
- package/dist/types/routes/management-api/action-executions.d.ts +90 -0
- package/dist/types/routes/management-api/action-triggers.d.ts +118 -0
- package/dist/types/routes/management-api/actions.d.ts +673 -0
- package/dist/types/routes/management-api/analytics.d.ts +18 -0
- package/dist/types/routes/management-api/attack-protection.d.ts +189 -0
- package/dist/types/routes/management-api/authentication-methods.d.ts +115 -0
- package/dist/types/routes/management-api/branding.d.ts +402 -0
- package/dist/types/routes/management-api/client-grants.d.ts +183 -0
- package/dist/types/routes/management-api/client-registration-tokens.d.ts +35 -0
- package/dist/types/routes/management-api/clients.d.ts +995 -0
- package/dist/types/routes/management-api/connections.d.ts +872 -0
- package/dist/types/routes/management-api/custom-domains.d.ts +266 -0
- package/dist/types/routes/management-api/email-templates.d.ts +205 -0
- package/dist/types/routes/management-api/emails.d.ts +124 -0
- package/dist/types/routes/management-api/failed-events.d.ts +146 -0
- package/dist/types/routes/management-api/flows.d.ts +438 -0
- package/dist/types/routes/management-api/forms.d.ts +4090 -0
- package/dist/types/routes/management-api/guardian.d.ts +211 -0
- package/dist/types/routes/management-api/hook-code.d.ts +142 -0
- package/dist/types/routes/management-api/hooks.d.ts +405 -0
- package/dist/types/routes/management-api/index.d.ts +13210 -0
- package/dist/types/routes/management-api/keys.d.ts +98 -0
- package/dist/types/routes/management-api/log-streams.d.ts +170 -0
- package/dist/types/routes/management-api/logs.d.ts +159 -0
- package/dist/types/routes/management-api/migration-sources.d.ts +173 -0
- package/dist/types/routes/management-api/organizations.d.ts +896 -0
- package/dist/types/routes/management-api/prompts.d.ts +150 -0
- package/dist/types/routes/management-api/refresh_tokens.d.ts +66 -0
- package/dist/types/routes/management-api/resource-servers.d.ts +321 -0
- package/dist/types/routes/management-api/roles.d.ts +260 -0
- package/dist/types/routes/management-api/sessions.d.ts +78 -0
- package/dist/types/routes/management-api/stats.d.ts +44 -0
- package/dist/types/routes/management-api/tenants.d.ts +546 -0
- package/dist/types/routes/management-api/themes.d.ts +265 -0
- package/dist/types/routes/management-api/tickets.d.ts +75 -0
- package/dist/types/routes/management-api/users-by-email.d.ts +23 -0
- package/dist/types/routes/management-api/users.d.ts +1085 -0
- package/dist/types/routes/saml/index.d.ts +64 -0
- package/dist/types/routes/saml/samlp.d.ts +64 -0
- package/dist/types/routes/setup.d.ts +6 -0
- package/dist/types/routes/universal-login/account-change-email-confirmation.d.ts +30 -0
- package/dist/types/routes/universal-login/account-change-email-verify.d.ts +66 -0
- package/dist/types/routes/universal-login/account-change-email.d.ts +58 -0
- package/dist/types/routes/universal-login/account.d.ts +64 -0
- package/dist/types/routes/universal-login/common.d.ts +1482 -0
- package/dist/types/routes/universal-login/continue.d.ts +37 -0
- package/dist/types/routes/universal-login/enter-password.d.ts +49 -0
- package/dist/types/routes/universal-login/error-handler.d.ts +14 -0
- package/dist/types/routes/universal-login/error-page.d.ts +32 -0
- package/dist/types/routes/universal-login/error.d.ts +20 -0
- package/dist/types/routes/universal-login/flow-api.d.ts +381 -0
- package/dist/types/routes/universal-login/flow-widget.d.ts +23 -0
- package/dist/types/routes/universal-login/forgot-password.d.ts +32 -0
- package/dist/types/routes/universal-login/form-node.d.ts +74 -0
- package/dist/types/routes/universal-login/identifier.d.ts +55 -0
- package/dist/types/routes/universal-login/impersonate.d.ts +71 -0
- package/dist/types/routes/universal-login/index.d.ts +748 -0
- package/dist/types/routes/universal-login/info.d.ts +20 -0
- package/dist/types/routes/universal-login/invalid-session.d.ts +19 -0
- package/dist/types/routes/universal-login/otp-challenge.d.ts +54 -0
- package/dist/types/routes/universal-login/pre-signup-sent.d.ts +19 -0
- package/dist/types/routes/universal-login/pre-signup.d.ts +32 -0
- package/dist/types/routes/universal-login/reset-password.d.ts +39 -0
- package/dist/types/routes/universal-login/sanitization-utils.d.ts +55 -0
- package/dist/types/routes/universal-login/screen-api.d.ts +20 -0
- package/dist/types/routes/universal-login/screens/accept-invitation.d.ts +13 -0
- package/dist/types/routes/universal-login/screens/account-delete.d.ts +14 -0
- package/dist/types/routes/universal-login/screens/account-helpers.d.ts +13 -0
- package/dist/types/routes/universal-login/screens/account-linked.d.ts +14 -0
- package/dist/types/routes/universal-login/screens/account-mfa-phone-enrollment.d.ts +10 -0
- package/dist/types/routes/universal-login/screens/account-mfa-totp-enrollment.d.ts +10 -0
- package/dist/types/routes/universal-login/screens/account-passkeys.d.ts +10 -0
- package/dist/types/routes/universal-login/screens/account-profile.d.ts +14 -0
- package/dist/types/routes/universal-login/screens/account-security.d.ts +14 -0
- package/dist/types/routes/universal-login/screens/account.d.ts +14 -0
- package/dist/types/routes/universal-login/screens/connect-consent.d.ts +9 -0
- package/dist/types/routes/universal-login/screens/connect-tenant-select.d.ts +13 -0
- package/dist/types/routes/universal-login/screens/email-otp-challenge.d.ts +14 -0
- package/dist/types/routes/universal-login/screens/enter-password.d.ts +14 -0
- package/dist/types/routes/universal-login/screens/forgot-password.d.ts +11 -0
- package/dist/types/routes/universal-login/screens/identifier.d.ts +14 -0
- package/dist/types/routes/universal-login/screens/impersonate.d.ts +15 -0
- package/dist/types/routes/universal-login/screens/index.d.ts +29 -0
- package/dist/types/routes/universal-login/screens/login-passwordless-identifier.d.ts +17 -0
- package/dist/types/routes/universal-login/screens/login.d.ts +17 -0
- package/dist/types/routes/universal-login/screens/magic-link-sent.d.ts +11 -0
- package/dist/types/routes/universal-login/screens/mfa-login-options.d.ts +21 -0
- package/dist/types/routes/universal-login/screens/mfa-phone-challenge.d.ts +14 -0
- package/dist/types/routes/universal-login/screens/mfa-phone-enrollment.d.ts +14 -0
- package/dist/types/routes/universal-login/screens/mfa-totp-challenge.d.ts +14 -0
- package/dist/types/routes/universal-login/screens/mfa-totp-enrollment.d.ts +17 -0
- package/dist/types/routes/universal-login/screens/passkey-challenge.d.ts +16 -0
- package/dist/types/routes/universal-login/screens/passkey-enrollment-nudge.d.ts +17 -0
- package/dist/types/routes/universal-login/screens/passkey-enrollment.d.ts +11 -0
- package/dist/types/routes/universal-login/screens/passkey-utils.d.ts +100 -0
- package/dist/types/routes/universal-login/screens/registry.d.ts +28 -0
- package/dist/types/routes/universal-login/screens/reset-password-code.d.ts +18 -0
- package/dist/types/routes/universal-login/screens/reset-password.d.ts +36 -0
- package/dist/types/routes/universal-login/screens/signup.d.ts +14 -0
- package/dist/types/routes/universal-login/screens/sms-otp-challenge.d.ts +14 -0
- package/dist/types/routes/universal-login/screens/try-connection-result.d.ts +12 -0
- package/dist/types/routes/universal-login/screens/types.d.ts +167 -0
- package/dist/types/routes/universal-login/signup.d.ts +54 -0
- package/dist/types/routes/universal-login/u2-form-node.d.ts +93 -0
- package/dist/types/routes/universal-login/u2-index.d.ts +173 -0
- package/dist/types/routes/universal-login/u2-routes.d.ts +98 -0
- package/dist/types/routes/universal-login/u2-widget-page.d.ts +187 -0
- package/dist/types/routes/universal-login/universal-login-template.d.ts +55 -0
- package/dist/types/routes/universal-login/validate-email.d.ts +20 -0
- package/dist/types/routes/universal-login/widget-routes.d.ts +81 -0
- package/dist/types/seed.d.ts +86 -0
- package/dist/types/state-machines/index.d.ts +1 -0
- package/dist/types/state-machines/login-session.d.ts +173 -0
- package/dist/types/storybook-utils/HonoJSXWrapper.d.ts +43 -0
- package/dist/types/strategies/apple.d.ts +24 -0
- package/dist/types/strategies/facebook.d.ts +20 -0
- package/dist/types/strategies/github.d.ts +23 -0
- package/dist/types/strategies/google-oauth2.d.ts +43 -0
- package/dist/types/strategies/index.d.ts +69 -0
- package/dist/types/strategies/internal-oauth2.d.ts +17 -0
- package/dist/types/strategies/microsoft.d.ts +24 -0
- package/dist/types/strategies/oauth2.d.ts +38 -0
- package/dist/types/strategies/oidc.d.ts +38 -0
- package/dist/types/strategies/saml.d.ts +9 -0
- package/dist/types/strategies/vipps.d.ts +16 -0
- package/dist/types/styles/index.d.ts +9 -0
- package/dist/types/styles/tailwind.d.ts +1 -0
- package/dist/types/types/Auth0Client.d.ts +9 -0
- package/dist/types/types/AuthError.d.ts +14 -0
- package/dist/types/types/AuthHeroConfig.d.ts +415 -0
- package/dist/types/types/Bindings.d.ts +51 -0
- package/dist/types/types/GrantFlowResult.d.ts +22 -0
- package/dist/types/types/Hooks.d.ts +240 -0
- package/dist/types/types/IdToken.d.ts +30 -0
- package/dist/types/types/UserInfo.d.ts +8 -0
- package/dist/types/types/Variables.d.ts +33 -0
- package/dist/types/types/auth0/Query.d.ts +12 -0
- package/dist/types/types/auth0/Totals.d.ts +11 -0
- package/dist/types/types/auth0/UserResponse.d.ts +46 -0
- package/dist/types/types/auth0/index.d.ts +3 -0
- package/dist/types/types/index.d.ts +6 -0
- package/dist/types/types/saml.d.ts +1 -0
- package/dist/types/utils/append-log.d.ts +10 -0
- package/dist/types/utils/auth-header.d.ts +18 -0
- package/dist/types/utils/auth0-upstream.d.ts +60 -0
- package/dist/types/utils/authIframe.d.ts +11 -0
- package/dist/types/utils/client-info.d.ts +47 -0
- package/dist/types/utils/color.d.ts +23 -0
- package/dist/types/utils/connections.d.ts +11 -0
- package/dist/types/utils/cookies.d.ts +28 -0
- package/dist/types/utils/crypto.d.ts +2 -0
- package/dist/types/utils/deep-merge.d.ts +6 -0
- package/dist/types/utils/encryption.d.ts +22 -0
- package/dist/types/utils/entity-id.d.ts +13 -0
- package/dist/types/utils/fetchAll.d.ts +60 -0
- package/dist/types/utils/form-post.d.ts +1 -0
- package/dist/types/utils/id-token-hash.d.ts +1 -0
- package/dist/types/utils/incognito.d.ts +11 -0
- package/dist/types/utils/instance-to-json.d.ts +8 -0
- package/dist/types/utils/ip.d.ts +8 -0
- package/dist/types/utils/is-valid-redirect-url.d.ts +4 -0
- package/dist/types/utils/jwk-alg.d.ts +20 -0
- package/dist/types/utils/jwks.d.ts +41 -0
- package/dist/types/utils/jwt.d.ts +15 -0
- package/dist/types/utils/organization-id.d.ts +2 -0
- package/dist/types/utils/otp.d.ts +1 -0
- package/dist/types/utils/refresh-token-format.d.ts +20 -0
- package/dist/types/utils/safe-compare.d.ts +1 -0
- package/dist/types/utils/sort.d.ts +4 -0
- package/dist/types/utils/ssrf-fetch.d.ts +44 -0
- package/dist/types/utils/ulid.d.ts +1 -0
- package/dist/types/utils/url.d.ts +16 -0
- package/dist/types/utils/user-id.d.ts +2 -0
- package/dist/types/utils/username-password-provider.d.ts +67 -0
- package/dist/types/utils/username.d.ts +11 -0
- package/dist/types/variables.d.ts +4 -0
- package/package.json +11 -11
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MFA TOTP Enrollment screen - for setting up authenticator app MFA
|
|
3
|
+
*
|
|
4
|
+
* Corresponds to: /u2/mfa/totp-enrollment
|
|
5
|
+
*/
|
|
6
|
+
import type { ScreenContext, ScreenResult, ScreenDefinition } from "./types";
|
|
7
|
+
/**
|
|
8
|
+
* Create the mfa-totp-enrollment screen
|
|
9
|
+
*/
|
|
10
|
+
export declare function mfaTotpEnrollmentScreen(context: ScreenContext, extraData?: {
|
|
11
|
+
qrCodeSvg?: string;
|
|
12
|
+
secretBase32?: string;
|
|
13
|
+
}): Promise<ScreenResult>;
|
|
14
|
+
/**
|
|
15
|
+
* Screen definition for the mfa-totp-enrollment screen
|
|
16
|
+
*/
|
|
17
|
+
export declare const mfaTotpEnrollmentScreenDefinition: ScreenDefinition;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Passkey Challenge screen — WebAuthn authentication ceremony
|
|
3
|
+
*
|
|
4
|
+
* Allows users to sign in using a registered passkey (discoverable credential).
|
|
5
|
+
* This triggers navigator.credentials.get() and verifies the assertion response.
|
|
6
|
+
*
|
|
7
|
+
* GET: Generates WebAuthn authentication options and renders the challenge screen.
|
|
8
|
+
* POST: Verifies the assertion response, resolves the user, and completes login.
|
|
9
|
+
*
|
|
10
|
+
* Passkey authentication bypasses MFA since it already provides strong
|
|
11
|
+
* multi-factor assurance (possession + biometric/PIN).
|
|
12
|
+
*
|
|
13
|
+
* Corresponds to: /u2/passkey/challenge
|
|
14
|
+
*/
|
|
15
|
+
import type { ScreenDefinition } from "./types";
|
|
16
|
+
export declare const passkeyChallengeScreenDefinition: ScreenDefinition;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Passkey Enrollment Nudge screen
|
|
3
|
+
*
|
|
4
|
+
* Shown after login when progressive enrollment is enabled and the user
|
|
5
|
+
* has no passkeys registered. Offers three choices:
|
|
6
|
+
* - "Set up passkey" → proceeds to the enrollment ceremony
|
|
7
|
+
* - "Maybe later" → snoozes the prompt for 30 days
|
|
8
|
+
* - "Don't show again" → permanently opts out
|
|
9
|
+
*
|
|
10
|
+
* Client-side: if the browser doesn't support WebAuthn
|
|
11
|
+
* (window.PublicKeyCredential is undefined), the screen auto-submits
|
|
12
|
+
* with action_no_webauthn so the login flow is never blocked.
|
|
13
|
+
*
|
|
14
|
+
* Corresponds to: /u2/passkey/enrollment-nudge
|
|
15
|
+
*/
|
|
16
|
+
import type { ScreenDefinition } from "./types";
|
|
17
|
+
export declare const passkeyEnrollmentNudgeScreenDefinition: ScreenDefinition;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Passkey Enrollment screen — WebAuthn registration ceremony
|
|
3
|
+
*
|
|
4
|
+
* GET: Generates WebAuthn registration options and renders a screen that
|
|
5
|
+
* triggers `navigator.credentials.create()` via an inline script.
|
|
6
|
+
* POST: Verifies the attestation response and stores the credential.
|
|
7
|
+
*
|
|
8
|
+
* Corresponds to: /u2/passkey/enrollment
|
|
9
|
+
*/
|
|
10
|
+
import type { ScreenDefinition } from "./types";
|
|
11
|
+
export declare const passkeyEnrollmentScreenDefinition: ScreenDefinition;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared WebAuthn/passkey utilities used by passkey-enrollment, account-passkeys,
|
|
3
|
+
* passkey-challenge, and conditional mediation on identifier/login screens.
|
|
4
|
+
*/
|
|
5
|
+
import { AuthenticationMethod } from "@authhero/adapter-interfaces";
|
|
6
|
+
import { Context } from "hono";
|
|
7
|
+
import type { Bindings, Variables } from "../../../types";
|
|
8
|
+
import type { WebAuthnCeremony, ScreenContext } from "./types";
|
|
9
|
+
export declare const PASSKEY_TYPES: readonly ["passkey", "webauthn-roaming", "webauthn-platform"];
|
|
10
|
+
/**
|
|
11
|
+
* List the tenant-scoped passkey authentication methods for a given user.
|
|
12
|
+
* Filters out non-passkey types and rows missing a credential_id.
|
|
13
|
+
* Used by the challenge screen (to build allowCredentials) and by the login
|
|
14
|
+
* screen (to gate the "Log in with passkey" link when the current tenant has
|
|
15
|
+
* no matching credential for the known user).
|
|
16
|
+
*/
|
|
17
|
+
export declare function listTenantPasskeys(ctx: Context<{
|
|
18
|
+
Bindings: Bindings;
|
|
19
|
+
Variables: Variables;
|
|
20
|
+
}>, tenantId: string, userId: string): Promise<AuthenticationMethod[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Extract the RP ID from the host — strips port and uses the root domain.
|
|
23
|
+
* Must use the actual request host (not custom_domain) because WebAuthn
|
|
24
|
+
* requires rp.id to match the browser's current origin.
|
|
25
|
+
*/
|
|
26
|
+
export declare function getRpId(ctx: any): string;
|
|
27
|
+
/**
|
|
28
|
+
* Get the origin URL for WebAuthn verification.
|
|
29
|
+
* Must use the actual request host to match the browser's origin.
|
|
30
|
+
*/
|
|
31
|
+
export declare function getExpectedOrigin(ctx: any): string;
|
|
32
|
+
/**
|
|
33
|
+
* Build the inline JavaScript that triggers navigator.credentials.create()
|
|
34
|
+
* and auto-submits the form with the credential result.
|
|
35
|
+
*
|
|
36
|
+
* @param optionsJSON - JSON string of WebAuthn registration options
|
|
37
|
+
* @param successAction - The action value to set on successful registration (default: "register")
|
|
38
|
+
*/
|
|
39
|
+
export declare function buildWebAuthnRegistrationScript(optionsJSON: string, successAction?: string): string;
|
|
40
|
+
/**
|
|
41
|
+
* Build a structured WebAuthn ceremony object for the widget SPA flow.
|
|
42
|
+
* The widget validates the shape and performs the ceremony natively
|
|
43
|
+
* instead of executing arbitrary script content.
|
|
44
|
+
*
|
|
45
|
+
* @param optionsJSON - JSON string of WebAuthn registration options
|
|
46
|
+
* @param successAction - The action value to set on successful registration (default: "register")
|
|
47
|
+
*/
|
|
48
|
+
export declare function buildWebAuthnCeremony(optionsJSON: string, successAction?: string): WebAuthnCeremony;
|
|
49
|
+
/**
|
|
50
|
+
* Build the inline JavaScript that triggers navigator.credentials.get()
|
|
51
|
+
* for passkey authentication (login) and auto-submits the form.
|
|
52
|
+
*
|
|
53
|
+
* @param optionsJSON - JSON string of WebAuthn authentication options
|
|
54
|
+
* @param successAction - The action value to set on successful authentication (default: "authenticate")
|
|
55
|
+
*/
|
|
56
|
+
export declare function buildWebAuthnAuthenticationScript(optionsJSON: string, successAction?: string): string;
|
|
57
|
+
/**
|
|
58
|
+
* Build a structured WebAuthn authentication ceremony object for the widget SPA flow.
|
|
59
|
+
*
|
|
60
|
+
* @param optionsJSON - JSON string of WebAuthn authentication options
|
|
61
|
+
* @param successAction - The action value to set on successful authentication (default: "authenticate")
|
|
62
|
+
*/
|
|
63
|
+
export declare function buildWebAuthnAuthenticationCeremony(optionsJSON: string, successAction?: string): WebAuthnCeremony;
|
|
64
|
+
/**
|
|
65
|
+
* Build a structured WebAuthn conditional mediation ceremony object for the widget SPA flow.
|
|
66
|
+
* Conditional mediation shows passkey suggestions in the username field's autofill dropdown.
|
|
67
|
+
*
|
|
68
|
+
* @param optionsJSON - JSON string of WebAuthn authentication options
|
|
69
|
+
* @param successAction - The action value to set on successful authentication (default: "passkey-authenticate")
|
|
70
|
+
*/
|
|
71
|
+
export declare function buildWebAuthnConditionalMediationCeremony(optionsJSON: string, successAction?: string): WebAuthnCeremony;
|
|
72
|
+
/**
|
|
73
|
+
* Build inline JavaScript for conditional mediation (autofill-assisted passkeys).
|
|
74
|
+
* This script runs on page load and silently offers passkey suggestions in the
|
|
75
|
+
* username field's autofill dropdown via `navigator.credentials.get({ mediation: "conditional" })`.
|
|
76
|
+
*
|
|
77
|
+
* @param optionsJSON - JSON string of WebAuthn authentication options
|
|
78
|
+
* @param successAction - The action value to set on successful authentication (default: "passkey-authenticate")
|
|
79
|
+
*/
|
|
80
|
+
export declare function buildConditionalMediationScript(optionsJSON: string, successAction?: string): string;
|
|
81
|
+
/**
|
|
82
|
+
* Result type for passkey verification
|
|
83
|
+
*/
|
|
84
|
+
export type PasskeyVerificationResult = {
|
|
85
|
+
success: true;
|
|
86
|
+
user: any;
|
|
87
|
+
primaryUser: any;
|
|
88
|
+
loginSession: any;
|
|
89
|
+
authConnection: string;
|
|
90
|
+
} | {
|
|
91
|
+
success: false;
|
|
92
|
+
error: string;
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Shared passkey authentication verification logic.
|
|
96
|
+
* Used by both passkey-challenge screen (MFA) and identifier/login screens (conditional mediation).
|
|
97
|
+
*
|
|
98
|
+
* Verifies the WebAuthn assertion response, resolves the user, and updates session state.
|
|
99
|
+
*/
|
|
100
|
+
export declare function verifyPasskeyAuthentication(context: ScreenContext, credentialJson: string): Promise<PasskeyVerificationResult>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Screen Registry - maps screen IDs to their definitions
|
|
3
|
+
*/
|
|
4
|
+
import type { ScreenDefinition, ScreenContext, ScreenResult } from "./types";
|
|
5
|
+
/**
|
|
6
|
+
* Registry of all built-in screens
|
|
7
|
+
*/
|
|
8
|
+
export declare const screenRegistry: Map<string, ScreenDefinition>;
|
|
9
|
+
/**
|
|
10
|
+
* Get a screen definition by ID
|
|
11
|
+
*/
|
|
12
|
+
export declare function getScreenDefinition(screenId: string): ScreenDefinition | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Get a screen by ID
|
|
15
|
+
*
|
|
16
|
+
* @param screenId - The screen ID (e.g., "identifier", "email-otp-challenge")
|
|
17
|
+
* @param context - The screen context with tenant, client, branding, etc.
|
|
18
|
+
* @returns The screen result promise or undefined if not found
|
|
19
|
+
*/
|
|
20
|
+
export declare function getScreen(screenId: string, context: ScreenContext): Promise<ScreenResult> | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* List all available screen IDs
|
|
23
|
+
*/
|
|
24
|
+
export declare function listScreenIds(): string[];
|
|
25
|
+
/**
|
|
26
|
+
* Check if a screen ID is valid
|
|
27
|
+
*/
|
|
28
|
+
export declare function isValidScreenId(screenId: string): boolean;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reset Password Code screen - enter code + new password
|
|
3
|
+
*
|
|
4
|
+
* Used when the connection's verification_method is "code".
|
|
5
|
+
* The user receives a 6-digit code via email and enters it
|
|
6
|
+
* along with their new password on the same page.
|
|
7
|
+
*
|
|
8
|
+
* Corresponds to: /u2/reset-password/code
|
|
9
|
+
*/
|
|
10
|
+
import type { ScreenContext, ScreenResult, ScreenDefinition } from "./types";
|
|
11
|
+
/**
|
|
12
|
+
* Create the reset-password-code screen
|
|
13
|
+
*/
|
|
14
|
+
export declare function resetPasswordCodeScreen(context: ScreenContext): Promise<ScreenResult>;
|
|
15
|
+
/**
|
|
16
|
+
* Screen definition for the reset-password-code screen
|
|
17
|
+
*/
|
|
18
|
+
export declare const resetPasswordCodeScreenDefinition: ScreenDefinition;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reset Password screen - set new password after reset
|
|
3
|
+
*
|
|
4
|
+
* Corresponds to: /u/reset-password
|
|
5
|
+
*/
|
|
6
|
+
import type { ScreenContext, ScreenResult, ScreenDefinition } from "./types";
|
|
7
|
+
import type { Context } from "hono";
|
|
8
|
+
import type { Bindings, Variables } from "../../../types";
|
|
9
|
+
import type { EnrichedClient } from "../../../helpers/client";
|
|
10
|
+
/**
|
|
11
|
+
* Shared helper to execute a password reset: validate code, validate policy,
|
|
12
|
+
* update password, mark email verified, log, and delete code.
|
|
13
|
+
*/
|
|
14
|
+
export declare function executePasswordReset(params: {
|
|
15
|
+
ctx: Context<{
|
|
16
|
+
Bindings: Bindings;
|
|
17
|
+
Variables: Variables;
|
|
18
|
+
}>;
|
|
19
|
+
client: EnrichedClient;
|
|
20
|
+
code: string;
|
|
21
|
+
password: string;
|
|
22
|
+
username: string;
|
|
23
|
+
}): Promise<{
|
|
24
|
+
success: true;
|
|
25
|
+
} | {
|
|
26
|
+
error: string;
|
|
27
|
+
field: "code" | "password";
|
|
28
|
+
}>;
|
|
29
|
+
/**
|
|
30
|
+
* Create the reset-password screen
|
|
31
|
+
*/
|
|
32
|
+
export declare function resetPasswordScreen(context: ScreenContext): Promise<ScreenResult>;
|
|
33
|
+
/**
|
|
34
|
+
* Screen definition for the reset-password screen
|
|
35
|
+
*/
|
|
36
|
+
export declare const resetPasswordScreenDefinition: ScreenDefinition;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Signup screen - for new user registration
|
|
3
|
+
*
|
|
4
|
+
* Corresponds to: /u/signup
|
|
5
|
+
*/
|
|
6
|
+
import type { ScreenContext, ScreenResult, ScreenDefinition } from "./types";
|
|
7
|
+
/**
|
|
8
|
+
* Create the signup screen
|
|
9
|
+
*/
|
|
10
|
+
export declare function signupScreen(context: ScreenContext): Promise<ScreenResult>;
|
|
11
|
+
/**
|
|
12
|
+
* Screen definition for the signup screen
|
|
13
|
+
*/
|
|
14
|
+
export declare const signupScreenDefinition: ScreenDefinition;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SMS OTP Challenge screen - for SMS OTP verification
|
|
3
|
+
*
|
|
4
|
+
* Corresponds to: /u/login/sms-otp-challenge
|
|
5
|
+
*/
|
|
6
|
+
import type { ScreenContext, ScreenResult, ScreenDefinition } from "./types";
|
|
7
|
+
/**
|
|
8
|
+
* Create the sms-otp-challenge screen
|
|
9
|
+
*/
|
|
10
|
+
export declare function smsOtpChallengeScreen(context: ScreenContext): Promise<ScreenResult>;
|
|
11
|
+
/**
|
|
12
|
+
* Screen definition for the sms-otp-challenge screen
|
|
13
|
+
*/
|
|
14
|
+
export declare const smsOtpChallengeScreenDefinition: ScreenDefinition;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Try-Connection Result screen — diagnostic page that renders the outcome
|
|
3
|
+
* of a connection test (initiated via `POST /api/v2/connections/{id}/try`).
|
|
4
|
+
*
|
|
5
|
+
* Corresponds to: /u2/try-connection-result
|
|
6
|
+
*
|
|
7
|
+
* The result is read from `loginSession.state_data` — the connection
|
|
8
|
+
* callback writes it there before redirecting here.
|
|
9
|
+
*/
|
|
10
|
+
import type { ScreenContext, ScreenResult, ScreenDefinition } from "./types";
|
|
11
|
+
export declare function tryConnectionResultScreen(context: ScreenContext): Promise<ScreenResult>;
|
|
12
|
+
export declare const tryConnectionResultScreenDefinition: ScreenDefinition;
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for built-in screens
|
|
3
|
+
*/
|
|
4
|
+
import { Context } from "hono";
|
|
5
|
+
import { UiScreen, Tenant, Theme, Connection, CustomText } from "@authhero/adapter-interfaces";
|
|
6
|
+
import { EnrichedClient } from "../../../helpers/client";
|
|
7
|
+
import { Bindings, Variables } from "../../../types";
|
|
8
|
+
/**
|
|
9
|
+
* Branding information for screen rendering
|
|
10
|
+
*/
|
|
11
|
+
export interface ScreenBranding {
|
|
12
|
+
logo_url?: string;
|
|
13
|
+
favicon_url?: string;
|
|
14
|
+
powered_by_logo_url?: string;
|
|
15
|
+
colors?: {
|
|
16
|
+
primary?: string;
|
|
17
|
+
page_background?: string | {
|
|
18
|
+
type?: string;
|
|
19
|
+
start?: string;
|
|
20
|
+
end?: string;
|
|
21
|
+
angle_deg?: number;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
font?: {
|
|
25
|
+
url?: string;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Context passed to screen factories
|
|
30
|
+
*/
|
|
31
|
+
export interface ScreenContext {
|
|
32
|
+
/** The Hono context */
|
|
33
|
+
ctx: Context<{
|
|
34
|
+
Bindings: Bindings;
|
|
35
|
+
Variables: Variables;
|
|
36
|
+
}>;
|
|
37
|
+
/** The current tenant */
|
|
38
|
+
tenant: Tenant;
|
|
39
|
+
/** The current client application - uses EnrichedClient which has full connection objects */
|
|
40
|
+
client: EnrichedClient;
|
|
41
|
+
/** Theme configuration */
|
|
42
|
+
theme?: Theme;
|
|
43
|
+
/** Branding configuration */
|
|
44
|
+
branding?: ScreenBranding;
|
|
45
|
+
/** Available connections for this client */
|
|
46
|
+
connections: Connection[];
|
|
47
|
+
/** The login state parameter */
|
|
48
|
+
state: string;
|
|
49
|
+
/** Pre-filled values for form fields */
|
|
50
|
+
prefill?: Record<string, string | undefined>;
|
|
51
|
+
/** Error messages to display */
|
|
52
|
+
errors?: Record<string, string>;
|
|
53
|
+
/** Screen-level messages to display (errors, success, info, warnings) */
|
|
54
|
+
messages?: Array<{
|
|
55
|
+
text: string;
|
|
56
|
+
type: "error" | "success" | "info" | "warning";
|
|
57
|
+
}>;
|
|
58
|
+
/** Additional screen-specific data */
|
|
59
|
+
data?: Record<string, unknown>;
|
|
60
|
+
/** Route prefix for universal login routes (e.g., "/u" or "/u2") */
|
|
61
|
+
routePrefix?: string;
|
|
62
|
+
/** Custom texts for the current language */
|
|
63
|
+
customText?: CustomText;
|
|
64
|
+
/** Current language code (e.g., 'en', 'es') */
|
|
65
|
+
language?: string;
|
|
66
|
+
/** Prompt screen ID for custom text namespacing (e.g., 'login-id', 'signup') */
|
|
67
|
+
promptScreen?: string;
|
|
68
|
+
/** Screen name for extracting screen-specific custom text from nested structure */
|
|
69
|
+
screenName?: string;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Structured WebAuthn ceremony data sent to the widget instead of raw script.
|
|
73
|
+
* The widget validates the shape and performs the ceremony natively.
|
|
74
|
+
*/
|
|
75
|
+
export interface WebAuthnCeremony {
|
|
76
|
+
type: "webauthn-registration" | "webauthn-authentication" | "webauthn-authentication-conditional";
|
|
77
|
+
options: {
|
|
78
|
+
challenge: string;
|
|
79
|
+
rp?: {
|
|
80
|
+
id: string;
|
|
81
|
+
name: string;
|
|
82
|
+
};
|
|
83
|
+
rpId?: string;
|
|
84
|
+
user?: {
|
|
85
|
+
id: string;
|
|
86
|
+
name: string;
|
|
87
|
+
displayName: string;
|
|
88
|
+
};
|
|
89
|
+
pubKeyCredParams?: Array<{
|
|
90
|
+
alg: number;
|
|
91
|
+
type: string;
|
|
92
|
+
}>;
|
|
93
|
+
timeout?: number;
|
|
94
|
+
attestation?: string;
|
|
95
|
+
authenticatorSelection?: {
|
|
96
|
+
residentKey?: string;
|
|
97
|
+
userVerification?: string;
|
|
98
|
+
};
|
|
99
|
+
excludeCredentials?: Array<{
|
|
100
|
+
id: string;
|
|
101
|
+
type: string;
|
|
102
|
+
transports?: string[];
|
|
103
|
+
}>;
|
|
104
|
+
userVerification?: string;
|
|
105
|
+
allowCredentials?: Array<{
|
|
106
|
+
id: string;
|
|
107
|
+
type: string;
|
|
108
|
+
transports?: string[];
|
|
109
|
+
}>;
|
|
110
|
+
};
|
|
111
|
+
successAction: string;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Result from a screen factory
|
|
115
|
+
*/
|
|
116
|
+
export interface ScreenResult {
|
|
117
|
+
/** The screen definition for the widget */
|
|
118
|
+
screen: UiScreen;
|
|
119
|
+
/** Branding to apply */
|
|
120
|
+
branding?: ScreenBranding;
|
|
121
|
+
/** Optional inline script to inject at page level (e.g. WebAuthn ceremony) */
|
|
122
|
+
extraScript?: string;
|
|
123
|
+
/** Structured WebAuthn ceremony data for widget-based flows */
|
|
124
|
+
ceremony?: WebAuthnCeremony;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* A screen factory creates a UiScreen from context
|
|
128
|
+
* Always async for consistency (even if the implementation is sync)
|
|
129
|
+
*/
|
|
130
|
+
export type ScreenFactory = (context: ScreenContext) => Promise<ScreenResult>;
|
|
131
|
+
/**
|
|
132
|
+
* Handler for screen form submissions
|
|
133
|
+
*/
|
|
134
|
+
export interface ScreenHandler {
|
|
135
|
+
/** Handle GET request - returns the screen (can be sync or async) */
|
|
136
|
+
get: ScreenFactory;
|
|
137
|
+
/** Handle POST request - process form data and return next screen or redirect */
|
|
138
|
+
post?: (context: ScreenContext, data: Record<string, unknown>) => Promise<{
|
|
139
|
+
screen: ScreenResult;
|
|
140
|
+
} | {
|
|
141
|
+
redirect: string;
|
|
142
|
+
cookies?: string[];
|
|
143
|
+
} | {
|
|
144
|
+
error: string;
|
|
145
|
+
screen: ScreenResult;
|
|
146
|
+
} | {
|
|
147
|
+
response: Response;
|
|
148
|
+
}>;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Screen definition including factory and optional handler
|
|
152
|
+
*/
|
|
153
|
+
export interface ScreenDefinition {
|
|
154
|
+
/** Unique screen ID (matches route path) */
|
|
155
|
+
id: string;
|
|
156
|
+
/** Human-readable name */
|
|
157
|
+
name: string;
|
|
158
|
+
/** Description */
|
|
159
|
+
description?: string;
|
|
160
|
+
/** The screen handler */
|
|
161
|
+
handler: ScreenHandler;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Get the correct login path based on the tenant's identifier_first setting.
|
|
165
|
+
* Returns "/u2/login" for password-first or "/u2/login/identifier" for identifier-first.
|
|
166
|
+
*/
|
|
167
|
+
export declare function getLoginPath(context: ScreenContext): Promise<string>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { OpenAPIHono } from "@hono/zod-openapi";
|
|
2
|
+
import { Bindings, Variables } from "../../types";
|
|
3
|
+
export declare const signupRoutes: OpenAPIHono<{
|
|
4
|
+
Bindings: Bindings;
|
|
5
|
+
Variables: Variables;
|
|
6
|
+
}, {
|
|
7
|
+
"/": {
|
|
8
|
+
$get: {
|
|
9
|
+
input: {
|
|
10
|
+
query: {
|
|
11
|
+
state: string;
|
|
12
|
+
code?: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
output: {};
|
|
16
|
+
outputFormat: string;
|
|
17
|
+
status: 200;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
} & {
|
|
21
|
+
"/": {
|
|
22
|
+
$post: {
|
|
23
|
+
input: {
|
|
24
|
+
query: {
|
|
25
|
+
state: string;
|
|
26
|
+
};
|
|
27
|
+
} & {
|
|
28
|
+
form: {
|
|
29
|
+
password: string;
|
|
30
|
+
"re-enter-password": string;
|
|
31
|
+
code?: string | undefined;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
output: Response;
|
|
35
|
+
outputFormat: "json";
|
|
36
|
+
status: import("hono/utils/http-status").StatusCode;
|
|
37
|
+
} | {
|
|
38
|
+
input: {
|
|
39
|
+
query: {
|
|
40
|
+
state: string;
|
|
41
|
+
};
|
|
42
|
+
} & {
|
|
43
|
+
form: {
|
|
44
|
+
password: string;
|
|
45
|
+
"re-enter-password": string;
|
|
46
|
+
code?: string | undefined;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
output: {};
|
|
50
|
+
outputFormat: string;
|
|
51
|
+
status: 302;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
}, "/">;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* U2 Form Node Routes - Widget-based form node rendering
|
|
3
|
+
*
|
|
4
|
+
* These routes serve form nodes with SSR + hydration for the widget-based
|
|
5
|
+
* universal login experience.
|
|
6
|
+
*
|
|
7
|
+
* Routes:
|
|
8
|
+
* - GET /u2/forms/:formId/nodes/:nodeId - Render form node with widget SSR
|
|
9
|
+
* - POST /u2/forms/:formId/nodes/:nodeId - Process form submission
|
|
10
|
+
*/
|
|
11
|
+
import { OpenAPIHono } from "@hono/zod-openapi";
|
|
12
|
+
import { Bindings, Variables } from "../../types";
|
|
13
|
+
export declare const u2FormNodeRoutes: OpenAPIHono<{
|
|
14
|
+
Bindings: Bindings;
|
|
15
|
+
Variables: Variables;
|
|
16
|
+
}, {
|
|
17
|
+
"/:formId/nodes/:nodeId": {
|
|
18
|
+
$get: {
|
|
19
|
+
input: {
|
|
20
|
+
param: {
|
|
21
|
+
formId: string;
|
|
22
|
+
nodeId: string;
|
|
23
|
+
};
|
|
24
|
+
} & {
|
|
25
|
+
query: {
|
|
26
|
+
state: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
output: {};
|
|
30
|
+
outputFormat: string;
|
|
31
|
+
status: 200;
|
|
32
|
+
} | {
|
|
33
|
+
input: {
|
|
34
|
+
param: {
|
|
35
|
+
formId: string;
|
|
36
|
+
nodeId: string;
|
|
37
|
+
};
|
|
38
|
+
} & {
|
|
39
|
+
query: {
|
|
40
|
+
state: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
output: {};
|
|
44
|
+
outputFormat: string;
|
|
45
|
+
status: 404;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
} & {
|
|
49
|
+
"/:formId/nodes/:nodeId": {
|
|
50
|
+
$post: {
|
|
51
|
+
input: {
|
|
52
|
+
param: {
|
|
53
|
+
formId: string;
|
|
54
|
+
nodeId: string;
|
|
55
|
+
};
|
|
56
|
+
} & {
|
|
57
|
+
query: {
|
|
58
|
+
state: string;
|
|
59
|
+
};
|
|
60
|
+
} & {
|
|
61
|
+
json: {
|
|
62
|
+
data: Record<string, any>;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
output: {};
|
|
66
|
+
outputFormat: string;
|
|
67
|
+
status: 404;
|
|
68
|
+
} | {
|
|
69
|
+
input: {
|
|
70
|
+
param: {
|
|
71
|
+
formId: string;
|
|
72
|
+
nodeId: string;
|
|
73
|
+
};
|
|
74
|
+
} & {
|
|
75
|
+
query: {
|
|
76
|
+
state: string;
|
|
77
|
+
};
|
|
78
|
+
} & {
|
|
79
|
+
json: {
|
|
80
|
+
data: Record<string, any>;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
output: {
|
|
84
|
+
screen: any;
|
|
85
|
+
branding: any;
|
|
86
|
+
} | {
|
|
87
|
+
redirect: string;
|
|
88
|
+
};
|
|
89
|
+
outputFormat: "json";
|
|
90
|
+
status: 200;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
}, "/">;
|