@joinmeow/cognito-passwordless-auth
Version:
Passwordless authentication with Amazon Cognito: FIDO2 (WebAuthn, support for Passkeys)
23 lines (22 loc) • 874 B
TypeScript
import { IdleState, BusyState, TokensFromSignIn } from "./model.js";
export declare function authenticateWithPlaintextPassword({ username, password, smsMfaCode, otpMfaCode, newPassword, deviceKey, tokensCb, statusCb, clientMetadata, }: {
/**
* Username, or alias (e-mail, phone number)
*/
username: string;
password: string;
smsMfaCode?: () => Promise<string>;
otpMfaCode?: () => Promise<string>;
newPassword?: () => Promise<string>;
/**
* Device key for device authentication (if available from previous sessions)
*/
deviceKey?: string;
tokensCb?: (tokens: TokensFromSignIn) => void | Promise<void>;
statusCb?: (status: BusyState | IdleState) => void;
currentStatus?: BusyState | IdleState;
clientMetadata?: Record<string, string>;
}): {
signedIn: Promise<TokensFromSignIn>;
abort: () => void;
};