UNPKG

amazon-cognito-passwordless-auth

Version:

Passwordless authentication with Amazon Cognito: FIDO2 (WebAuthn, support for Passkeys), Magic Link, SMS OTP Step Up

19 lines (18 loc) 729 B
import { IdleState, BusyState, TokensFromSignIn } from "./model.js"; export declare function authenticateWithPlaintextPassword({ username, password, smsMfaCode, otpMfaCode, newPassword, tokensCb, statusCb, clientMetadata, }: { /** * Username, or alias (e-mail, phone number) */ username: string; password: string; smsMfaCode?: () => Promise<string>; otpMfaCode?: () => Promise<string>; newPassword?: () => Promise<string>; tokensCb?: (tokens: TokensFromSignIn) => void | Promise<void>; statusCb?: (status: BusyState | IdleState) => void; currentStatus?: BusyState | IdleState; clientMetadata?: Record<string, string>; }): { signedIn: Promise<void>; abort: () => void; };