@authsignal/browser
Version:
<img width="1070" alt="Authsignal" src="https://raw.githubusercontent.com/authsignal/authsignal-browser/main/.github/images/authsignal.png">
28 lines (27 loc) • 1.68 kB
TypeScript
import { AddAuthenticatorRequest, AddAuthenticatorResponse, AuthenticationOptsRequest, AuthenticationOptsResponse, ChallengeRequest, ChallengeResponse, ErrorResponse, PasskeyAuthenticatorResponse, RegistrationOptsRequest, RegistrationOptsResponse, VerifyRequest, VerifyResponse } from "./types/passkey";
import { ApiClientOptions } from "./types/shared";
export declare class PasskeyApiClient {
tenantId: string;
baseUrl: string;
onTokenExpired?: () => void;
constructor({ baseUrl, tenantId, onTokenExpired }: ApiClientOptions);
registrationOptions({ token, username, authenticatorAttachment, useCookies, }: {
token: string;
} & RegistrationOptsRequest): Promise<RegistrationOptsResponse | ErrorResponse>;
authenticationOptions({ token, challengeId, useCookies, }: {
token?: string;
} & AuthenticationOptsRequest): Promise<AuthenticationOptsResponse | ErrorResponse>;
authenticationOptionsWeb({ token }: {
token?: string;
}): Promise<AuthenticationOptsResponse | ErrorResponse>;
addAuthenticator({ token, registrationCredential, conditionalCreate, challengeId, useCookies, }: {
token: string;
} & AddAuthenticatorRequest): Promise<AddAuthenticatorResponse | ErrorResponse>;
verify({ authenticationCredential, token, deviceId, challengeId, useCookies, }: {
token?: string;
} & VerifyRequest): Promise<VerifyResponse | ErrorResponse>;
getPasskeyAuthenticator({ credentialIds, }: {
credentialIds: string[];
}): Promise<PasskeyAuthenticatorResponse | ErrorResponse>;
challenge({ action, useCookies }: ChallengeRequest): Promise<ChallengeResponse | ErrorResponse>;
}