isStepUpRequired | ({ scope: TokenScope }) => Promise<boolean> | Returns true if step-up auth is enabled and no valid elevated token exists for the scope |
checkStepUpAuth | ({ scope: TokenScope }) => Promise<StepUpCheckResponse> | Recommended. Server-authoritative check that returns { isRequired, credentials, defaultCredentialId }. The defaultCredentialId is the recommended credential to authenticate with. Defaults to required on failure. |
promptStepUpAuth | (params?) => Promise<string | undefined> | Auto-routes to MFA or re-auth, shows Dynamic’s built-in UI |
promptMfa | (params?) => Promise<string | undefined> | Shows Dynamic’s MFA UI (passkey or TOTP). Requires user to have registered MFA methods. |
promptReauthenticate | (params?) => Promise<string | undefined> | Shows Dynamic’s re-auth UI (OTP or wallet). Blocked when user has MFA enabled. |
sendOtp | (params?) => Promise<OTPVerification | null> | Sends OTP to the user’s sign-in enabled credential. Accepts optional { credentialId } to target a specific credential at call time. Returns { verificationType, credentialId }. |
verifyOtp | (params: VerifyOtpParams) => Promise<void> | Verify an OTP code with requested scopes |
verifyWallet | (params: VerifyWalletParams) => Promise<void> | Verify via external wallet signature. Accepts optional walletId to target a specific wallet. Defaults to the first connected wallet. Embedded wallets are not supported. |
verifySocial | (params: VerifySocialParams) => Promise<void> | Verify via a linked social account (OAuth popup) |
verifyPasskeyMfa | (params: VerifyPasskeyMfaParams) => Promise<string | undefined> | Verify via passkey (WebAuthn). Triggers browser passkey prompt. |
verifyTotpMfa | (params: VerifyTotpMfaParams) => Promise<string | undefined> | Verify via TOTP authenticator app code |
verifyRecoveryCode | (params: VerifyRecoveryCodeParams) => Promise<string | undefined> | Verify via backup recovery code |
state | { isLoading: boolean, error: string | null } | Loading and error state for headless methods |
resetState | () => void | Reset loading and error state. Call before retrying. |