capacitor-biometric-authentication
Version:
Framework-agnostic biometric authentication library. Works with React, Vue, Angular, or vanilla JS. No providers required!
23 lines (22 loc) • 1.13 kB
TypeScript
import { WebAuthnCreateOptions, WebAuthnGetOptions } from '../definitions';
export { toArrayBuffer, arrayBufferToBase64, arrayBufferToBase64URL, base64ToArrayBuffer, base64URLToArrayBuffer, generateChallenge, generateSessionId, } from './encoding';
/**
* Merge user-provided WebAuthn create options with defaults
*/
export declare function mergeCreateOptions(userOptions?: WebAuthnCreateOptions, defaults?: Partial<PublicKeyCredentialCreationOptions>): PublicKeyCredentialCreationOptions;
/**
* Merge user-provided WebAuthn get options with defaults
*/
export declare function mergeGetOptions(userOptions?: WebAuthnGetOptions, defaults?: Partial<PublicKeyCredentialRequestOptions>): PublicKeyCredentialRequestOptions;
/**
* Store credential ID in localStorage for future authentication
*/
export declare function storeCredentialId(credentialId: string, userId?: string): void;
/**
* Get stored credential IDs from localStorage
*/
export declare function getStoredCredentialIds(userId?: string): string[];
/**
* Clear stored credential IDs
*/
export declare function clearStoredCredentialIds(userId?: string): void;