@joinmeow/cognito-passwordless-auth
Version:
Passwordless authentication with Amazon Cognito: FIDO2 (WebAuthn, support for Passkeys)
21 lines (20 loc) • 848 B
TypeScript
import { TokensFromRefresh, TokensFromSignIn, BusyState, IdleState } from "./model.js";
/**
* Process tokens with storage lock protection to prevent race conditions
* in multi-tab/multi-process scenarios.
*/
export declare function processTokens(tokens: TokensFromSignIn | TokensFromRefresh, abort?: AbortSignal): Promise<TokensFromSignIn | TokensFromRefresh>;
/**
* Sign the user out. This means: clear tokens from storage,
* and revoke the refresh token from Amazon Cognito
* Note: The device key is preserved to enable device authentication on next login
*/
export declare const signOut: (props?: {
currentStatus?: BusyState | IdleState;
tokensRemovedLocallyCb?: () => void;
statusCb?: (status: BusyState | IdleState) => void;
skipTokenRevocation?: boolean;
}) => {
signedOut: Promise<void>;
abort: () => void;
};