@authsignal/browser
Version:
<img width="1070" alt="Authsignal" src="https://raw.githubusercontent.com/authsignal/authsignal-browser/main/.github/images/authsignal.png">
24 lines (23 loc) • 1.17 kB
TypeScript
import { AuthenticationResponseJSON, PublicKeyCredentialCreationOptionsJSON, PublicKeyCredentialRequestOptionsJSON, RegistrationResponseJSON } from "@simplewebauthn/browser";
import { AddAuthenticatorResponse, ErrorResponse, VerifyResponse } from "./types/passkey";
import { ApiClientOptions } from "./types/shared";
export declare class SecurityKeyApiClient {
tenantId: string;
baseUrl: string;
onTokenExpired?: () => void;
constructor({ baseUrl, tenantId, onTokenExpired }: ApiClientOptions);
registrationOptions({ token }: {
token: string;
}): Promise<PublicKeyCredentialCreationOptionsJSON | ErrorResponse>;
authenticationOptions({ token, }: {
token?: string;
}): Promise<PublicKeyCredentialRequestOptionsJSON | ErrorResponse>;
addAuthenticator({ token, registrationCredential, }: {
token: string;
registrationCredential: RegistrationResponseJSON;
}): Promise<AddAuthenticatorResponse | ErrorResponse>;
verify({ token, authenticationCredential, }: {
token?: string;
authenticationCredential: AuthenticationResponseJSON;
}): Promise<VerifyResponse | ErrorResponse>;
}