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

Biométrie native

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

Guide

Tutoriel sur les authentifications biométriques natives

Tester sur appareil

Téléchargez l'application Capgo, puis scannez le code QR code.

Lien QR de prévisualisation du plugin de biométrie native code

En utilisant @capgo/capacitor-native-biometric

Ce plugin donne accès aux API de biométrie 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 de biométrie d'authentification est disponible.
  • verifyIdentity - Demande à l'utilisateur de s'authentifier avec des biométries.
  • getCredentials - Récupère les informations de connexion stockées pour un serveur donné.
  • setCredentials - Stocke les informations de connexion données pour un serveur donné.

Utilisation d'exemple

isAvailable

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

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

await NativeBiometric.isAvailable();

verifyIdentity

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

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

await NativeBiometric.verifyIdentity();

getCredentials

Récupère les informations d'identification stockées pour un serveur donné.

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

await NativeBiometric.getCredentials({} as GetCredentialOptions);

setCredentials

Stocke les informations d'identification données pour un serveur donné.

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

await NativeBiometric.setCredentials({} as SetCredentialOptions);

Référence complète

Continuez à partir de l'utilisation de @capgo/capacitor-native-biometric

Si vous utilisez En utilisant @capgo/capacitor-native-biometric pour planifier l'authentification et les flux de compte, connectez-le avec @capgo/capacitor-native-biometric pour les détails d'implémentation dans @capgo/capacitor-native-biometric, Démarrage pour les détails d'implémentation dans Démarrage, @capgo/capacitor-social-login 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.