Using @capgo/capacitor-native-biometric
このプラグインは、AndroidおよびiOSのネイティブバイオメトリックAPIにアクセスすることができます。
インストール
bun add @capgo/capacitor-native-biometric
bunx cap sync
このプラグインが公開するもの
isAvailable- バイオメトリック認証ハードウェアが利用可能かどうかを確認します。verifyIdentity- ユーザーにバイオメトリック認証を求めます。getCredentials- 指定されたサーバーに対して保存されたクレデンシャルを取得します。setCredentials- 指定されたサーバーに対してクレデンシャルを保存します。
使用例
isAvailable
バイオメトリック認証ハードウェアが利用可能かどうかを確認します。
import { NativeBiometric } from '@capgo/capacitor-native-biometric';
await NativeBiometric.isAvailable();
verifyIdentity
指紋認証を使用してユーザーを認証するように促します。
import { NativeBiometric } from '@capgo/capacitor-native-biometric';
await NativeBiometric.verifyIdentity();
getCredentials
指定されたサーバーに対して保存されたクレデンシャルを取得します。
import { NativeBiometric } from '@capgo/capacitor-native-biometric';
await NativeBiometric.getCredentials({} as GetCredentialOptions);
setCredentials
指定されたサーバーに対してクレデンシャルを保存します。
import { NativeBiometric } from '@capgo/capacitor-native-biometric';
await NativeBiometric.setCredentials({} as SetCredentialOptions);
フル リファレンス
- GitHub https://github.com/Cap-go/capacitor-native-biometric/
- /docs/plugins/native-biometric/
Using @capgo/capacitor-native-biometric
指紋認証を使用してユーザーを認証するように促します。 Using @capgo/capacitor-native-biometric 認証とアカウントフローの計画に使用している場合、@__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-native-biometricを接続してください。 Using @capgo/capacitor-native-biometric for the implementation detail in @capgo/capacitor-native-biometric, Getting Started for the implementation detail in Getting Started, @capgo/capacitor-social-login for the implementation detail in @capgo/capacitor-social-login, @capgo/capacitor-passkey for the implementation detail in @capgo/capacitor-passkey, and Two-factor authentication for the implementation detail in Two-factor authentication.