UNPKG

capacitor-biometric-authentication

Version:

Framework-agnostic biometric authentication library. Works with React, Vue, Angular, or vanilla JS. No providers required!

53 lines (52 loc) 1.43 kB
/** * Platform detection information */ export interface PlatformInfo { /** Platform name */ name: string; /** Platform version */ version?: string; /** Running in Capacitor */ isCapacitor: boolean; /** Running in React Native */ isReactNative: boolean; /** Running in Cordova */ isCordova: boolean; /** Running in web browser */ isWeb: boolean; /** Running on iOS */ isIOS: boolean; /** Running on Android */ isAndroid: boolean; /** Running in Electron */ isElectron: boolean; /** Running on macOS */ isMacOS?: boolean; /** Running on Windows */ isWindows?: boolean; /** Running on Linux */ isLinux?: boolean; } /** * Supported platforms */ export type SupportedPlatform = 'web' | 'ios' | 'android' | 'electron' | 'capacitor'; /** * Platform capability flags */ export interface PlatformCapabilities { /** Supports WebAuthn API */ webAuthn: boolean; /** Supports native biometric API */ nativeBiometric: boolean; /** Supports secure storage (Keychain/Keystore) */ secureStorage: boolean; /** Supports platform authenticator */ platformAuthenticator: boolean; /** Supports roaming authenticators */ roamingAuthenticator: boolean; } /** * Get platform capabilities based on platform info */ export declare function getPlatformCapabilities(platform: PlatformInfo): PlatformCapabilities;