Allez directement au contenu principal
Capgo
Retour aux plugins
@capgo/capacitor-native-biometric
Tutoriel
@capgo/capacitor-native-biometric

Native Biometrique

Authentification sécurisée à l'aide de Face ID, Touch ID et d'APIs biométriques Android

Guide

Tutoriel sur les biométriques natives

Tester sur appareil

Download the Capgo app, then scan the QR code.

Native Biometric plugin preview QR code

Utilisez @capgo/capacitor-native-biometric

Ce plugin donne accès aux APIs de biométriques natives pour Android et iOS.

Installer

bun add @capgo/capacitor-native-biometric
bunx cap sync

Ce que ce plugin expose

  • isAvailable - Vérifie si le matériel d'authentification biométrique est disponible.
  • verifyIdentity - Demande à l'utilisateur de s'authentifier avec des biométriques.
  • getCredentials - Gets the stored credentials for a given server.
  • setCredentials - Stores the given credentials for a given server.

Exemple d'utilisation

isAvailable

Vérifie si le matériel d'authentification biométrique est disponible.

import { NativeBiometric } from '@capgo/capacitor-native-biometric';

await NativeBiometric.isAvailable();

verifyIdentity

Invite l'utilisateur à s'authentifier avec des biométriques.

import { NativeBiometric } from '@capgo/capacitor-native-biometric';

await NativeBiometric.verifyIdentity();

getCredentials

Gets the stored credentials for a given server.

import { NativeBiometric } from '@capgo/capacitor-native-biometric';

await NativeBiometric.getCredentials({} as GetCredentialOptions);

setCredentials

Stores the given credentials for a given server.

import { NativeBiometric } from '@capgo/capacitor-native-biometric';

await NativeBiometric.setCredentials({} as SetCredentialOptions);

Référence complète

Continuez à partir de @capgo/capacitor-native-biometrique

Si vous utilisez En utilisant @capgo/capacitor-native-biometric pour planifier l'authentification et les flux de compte, connectez-l’avec @capgo/capacitor-biométrique pour les détails d'implémentation dans @capgo/capacitor-native-biometric, Prise en main pour les détails d'implémentation dans Prise en main, @capgo/capacitor-connexion-social pour les détails d'implémentation dans @capgo/capacitor-social-login, @capgo/capacitor-passkey pour les détails d'implémentation dans @capgo/capacitor-passkey, et Authentification à deux facteurs pour les détails d'implémentation dans Authentification à deux facteurs.