Prise en main
Copiez un prompt de configuration incluant les étapes d'installation et le guide markdown complet pour ce plugin.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-firebase-authentication`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/firebase-authentication/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
Installer
Section intitulée « Installation »Vous pouvez utiliser notre configuration assistée par IA pour installer le plugin. Ajoutez les skills Capgo à votre outil d'IA avec la commande suivante :
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-pluginsUtilisez ensuite le prompt suivant :
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-firebase-authentication` plugin in my project.Si vous préférez une installation manuelle, installez le plugin en exécutant les commandes suivantes et suivez les instructions spécifiques à chaque plateforme ci-dessous :
bun add @capgo/capacitor-firebase-authenticationnpx cap syncImporter
Section intitulée « Import »import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';Démarrage rapide
Section intitulée « Démarrage rapide »import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.applyActionCode({ oobCode: 'oob-code' });Exemple : confirmPasswordReset
Section intitulée « Exemple : confirmPasswordReset »import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.confirmPasswordReset({ oobCode: 'oob-code', newPassword: 'new-password',});Exemple : confirmVerificationCode
Section intitulée « Exemple : confirmVerificationCode »import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.confirmVerificationCode({ verificationId: 'phoneCodeSent', verificationCode: 'phoneCodeSent',});// The result holds sensitive values: use it without logging it.Erreurs courantes
Section intitulée « Erreurs courantes »- Écouteurs: supprimez les handles lors du démontage des écrans.
- Sync native : exécuter
npx cap syncaprès les mises à jour du plugin. - Source de vérité : fiez-vous
src/definitions.tsau repo GitHub.
Aperçu de API
Section intitulée « Aperçu API »applyActionCode
Section intitulée « applyActionCode »Applique un code de vérification envoyé à l'utilisateur par e-mail.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.applyActionCode({ oobCode: 'oob-code' });confirmPasswordReset
Section intitulée « confirmPasswordReset »Finalise la réinitialisation du mot de passe.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.confirmPasswordReset({ oobCode: 'oob-code', newPassword: 'new-password',});confirmVerificationCode
Section intitulée « confirmVerificationCode »Termine le processus de vérification du numéro de téléphone.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.confirmVerificationCode({ verificationId: 'phoneCodeSent', verificationCode: 'phoneCodeSent',});// The result holds sensitive values: use it without logging it.createUserWithEmailAndPassword
Section intitulée « createUserWithEmailAndPassword »Crée un nouveau compte utilisateur avec un e-mail et un mot de passe. Si le nouveau compte a été créé, l’utilisateur est automatiquement connecté.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.createUserWithEmailAndPassword({ email: 'user@example.com', password: 'password',});// The result holds sensitive values: use it without logging it.deleteUser
Section intitulée « deleteUser »Supprime l'utilisateur et le déconnecte.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.deleteUser();fetchSignInMethodsForEmail
Section intitulée « fetchSignInMethodsForEmail »Récupère les méthodes de connexion pour une adresse e-mail.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.fetchSignInMethodsForEmail({ email: 'user@example.com' });console.log(result);getCurrentUser
Section intitulée « getCurrentUser »Récupère l'utilisateur actuellement connecté.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.getCurrentUser();// The result holds sensitive values: use it without logging it.getPendingAuthResult
Section intitulée « getPendingAuthResult »Retourne le SignInResult si votre application a lancé un flux de connexion web et que l'OS ferme l'application en arrière-plan.
Disponible uniquement pour Android.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.getPendingAuthResult();// The result holds sensitive values: use it without logging it.getIdToken
Section intitulée « getIdToken »Récupère le token ID Firebase Auth pour l'utilisateur actuellement connecté.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.getIdToken();// The result holds sensitive values: use it without logging it.getIdTokenResult
Section intitulée « getIdTokenResult »Retourne un JSON Web Token (JWT) désérialisé utilisé pour identifier l'utilisateur auprès d'un service Firebase.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.getIdTokenResult();// The result holds sensitive values: use it without logging it.getRedirectResult
Section intitulée « getRedirectResult »Retourne le SignInResult du flux de connexion basé sur une redirection.
Si la connexion a échoué, échoue avec une erreur.
Si aucune opération de redirection n'a été appelée, renvoie un SignInResult avec un utilisateur null.
Disponible uniquement pour le Web.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.getRedirectResult();// The result holds sensitive values: use it without logging it.getTenantId
Section intitulée « getTenantId »Récupérer l'ID du tenant.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.getTenantId();console.log(result);isSignInWithEmailLink
Section intitulée « isSignInWithEmailLink »Vérifie si un lien entrant est une connexion par lien e-mail compatible avec signInWithEmailLink.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.isSignInWithEmailLink({ emailLink: 'https://example.com' });// The result holds sensitive values: use it without logging it.linkWithApple
Section intitulée « linkWithApple »Lier le compte utilisateur au fournisseur d'authentification Apple.
L'utilisateur doit être connecté sur la couche native.
Le skipNativeAuth l'option de configuration n'a aucun effet ici.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithApple();// The result holds sensitive values: use it without logging it.linkWithEmailAndPassword
Section intitulée « linkWithEmailAndPassword »Lier le compte utilisateur au fournisseur d'authentification par e-mail.
L'utilisateur doit être connecté sur la couche native.
Le skipNativeAuth l'option de configuration n'a aucun effet ici.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithEmailAndPassword({ email: 'user@example.com', password: 'password',});// The result holds sensitive values: use it without logging it.linkWithEmailLink
Section intitulée « linkWithEmailLink »Lier le compte utilisateur au fournisseur d'authentification par e-mail.
L'utilisateur doit être connecté sur la couche native.
Le skipNativeAuth l'option de configuration n'a aucun effet ici.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithEmailLink({ email: 'user@example.com', emailLink: 'https://example.com',});// The result holds sensitive values: use it without logging it.linkWithFacebook
Section intitulée « linkWithFacebook »Lier le compte utilisateur au fournisseur d'authentification Facebook.
L'utilisateur doit être connecté sur la couche native.
Le skipNativeAuth l'option de configuration n'a aucun effet ici.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithFacebook();// The result holds sensitive values: use it without logging it.linkWithGameCenter
Section intitulée « linkWithGameCenter »Associe le compte utilisateur au fournisseur d'authentification Game Center.
L'utilisateur doit être connecté sur la couche native.
Le skipNativeAuth l'option de configuration n'a aucun effet ici.
Disponible uniquement pour iOS.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithGameCenter();// The result holds sensitive values: use it without logging it.linkWithGithub
Section intitulée « linkWithGithub »Associe le compte utilisateur au fournisseur d’authentification GitHub.
L'utilisateur doit être connecté sur la couche native.
Le skipNativeAuth l'option de configuration n'a aucun effet ici.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithGithub();// The result holds sensitive values: use it without logging it.linkWithGoogle
Section intitulée « linkWithGoogle »Associe le compte utilisateur au fournisseur d’authentification Google.
L'utilisateur doit être connecté sur la couche native.
Le skipNativeAuth l'option de configuration n'a aucun effet ici.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithGoogle();// The result holds sensitive values: use it without logging it.linkWithMicrosoft
Section intitulée « linkWithMicrosoft »Associe le compte utilisateur au fournisseur d’authentification Microsoft.
L'utilisateur doit être connecté sur la couche native.
Le skipNativeAuth l'option de configuration n'a aucun effet ici.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithMicrosoft();// The result holds sensitive values: use it without logging it.linkWithOpenIdConnect
Section intitulée « linkWithOpenIdConnect »Associe le compte utilisateur à un fournisseur OpenID Connect.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithOpenIdConnect({ providerId: 'provider-id-123' });// The result holds sensitive values: use it without logging it.linkWithPhoneNumber
Section intitulée « linkWithPhoneNumber »Associe le compte utilisateur au fournisseur d’authentification par numéro de téléphone.
L'utilisateur doit être connecté sur la couche native.
Le skipNativeAuth l'option de configuration n'a aucun effet ici.
Utilisez le phoneVerificationCompleted écouteur pour être notifié lorsque la vérification est terminée.
Utilisez le phoneVerificationFailed écouteur pour être notifié en cas d'échec de la vérification.
Utilisez le phoneCodeSent écouteur pour obtenir l'ID de vérification.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.linkWithPhoneNumber({ phoneNumber: "+16505550101" });linkWithPlayGames
Section intitulée « linkWithPlayGames »Associe le compte utilisateur au fournisseur d’authentification Play Games.
L'utilisateur doit être connecté sur la couche native.
Le skipNativeAuth l'option de configuration n'a aucun effet ici.
Disponible uniquement pour Android.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithPlayGames();// The result holds sensitive values: use it without logging it.linkWithTwitter
Section intitulée « linkWithTwitter »Associe le compte utilisateur au fournisseur d’authentification Twitter.
L'utilisateur doit être connecté sur la couche native.
Le skipNativeAuth l'option de configuration n'a aucun effet ici.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithTwitter();// The result holds sensitive values: use it without logging it.linkWithYahoo
Section intitulée « linkWithYahoo »Associe le compte utilisateur au fournisseur d'authentification Yahoo.
L'utilisateur doit être connecté sur la couche native.
Le skipNativeAuth l'option de configuration n'a aucun effet ici.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithYahoo();// The result holds sensitive values: use it without logging it.Recharge les données du compte utilisateur, si connecté.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.reload();revokeAccessToken
Section intitulée « revokeAccessToken »Révoque le token d'accès fourni. Prend actuellement en charge uniquement les tokens d'accès Apple OAuth.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.revokeAccessToken({ token: 'token-123' });sendEmailVerification
Section intitulée « sendEmailVerification »Envoie un e-mail de vérification à l'utilisateur actuellement connecté.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.sendEmailVerification();sendPasswordResetEmail
Section intitulée « sendPasswordResetEmail »Envoie un e-mail de réinitialisation de mot de passe.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.sendPasswordResetEmail({ email: 'user@example.com' });sendSignInLinkToEmail
Section intitulée « sendSignInLinkToEmail »Envoie un lien de connexion par e-mail à l'utilisateur ayant l'adresse e-mail indiquée.
Pour finaliser la connexion avec le lien e-mail, appelez signInWithEmailLink avec l'adresse e-mail et le lien de confirmation fournis dans l'e-mail envoyé à l'utilisateur.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.sendSignInLinkToEmail({ email: 'user@example.com', actionCodeSettings: { url: 'https://example.com' },});setLanguageCode
Section intitulée « setLanguageCode »Définit la langue code pour les opérations d'authentification.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.setLanguageCode({ languageCode: "en-US" });setPersistence
Section intitulée « setPersistence »Définit le type de persistance de la session d'authentification enregistrée.
Disponible uniquement pour le Web.
import { FirebaseAuthentication, Persistence } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.setPersistence({ persistence: Persistence.IndexedDbLocal });setTenantId
Section intitulée « setTenantId »Définit l'ID du tenant.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.setTenantId({ tenantId: 'tenant-id-123' });signInAnonymously
Section intitulée « signInAnonymously »Se connecte en tant qu'utilisateur anonyme.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInAnonymously();// The result holds sensitive values: use it without logging it.signInWithApple
Section intitulée « signInWithApple »Lance le flux de connexion Apple.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithApple();// The result holds sensitive values: use it without logging it.signInWithCustomToken
Section intitulée « signInWithCustomToken »Lance le flux de connexion via Custom Token.
Cette méthode ne peut pas être utilisée conjointement avec skipNativeAuth sur Android et iOS.
Dans ce cas, vous devez utiliser l’ signInWithCustomToken interface du Firebase JS SDK directement.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithCustomToken({ token: 'token-123' });// The result holds sensitive values: use it without logging it.signInWithEmailAndPassword
Section intitulée « signInWithEmailAndPassword »Lance le flux de connexion par e-mail et mot de passe.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithEmailAndPassword({ email: 'user@example.com', password: 'password',});// The result holds sensitive values: use it without logging it.signInWithEmailLink
Section intitulée « signInWithEmailLink »Se connecte via un e-mail et un lien de connexion.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithEmailLink({ email: 'user@example.com', emailLink: 'https://example.com',});// The result holds sensitive values: use it without logging it.signInWithFacebook
Section intitulée « signInWithFacebook »Lance le flux de connexion Facebook.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithFacebook();// The result holds sensitive values: use it without logging it.signInWithGameCenter
Section intitulée « signInWithGameCenter »Lance le flux de connexion Game Center.
Disponible uniquement pour iOS.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithGameCenter();// The result holds sensitive values: use it without logging it.signInWithGithub
Section intitulée « signInWithGithub »Lance le flux de connexion GitHub.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithGithub();// The result holds sensitive values: use it without logging it.signInWithGoogle
Section intitulée « signInWithGoogle »Lance le flux de connexion Google.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithGoogle();// The result holds sensitive values: use it without logging it.signInWithMicrosoft
Section intitulée « signInWithMicrosoft »Lance le flux de connexion Microsoft.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithMicrosoft();// The result holds sensitive values: use it without logging it.signInWithOpenIdConnect
Section intitulée « signInWithOpenIdConnect »Lance le flux de connexion OpenID Connect.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithOpenIdConnect({ providerId: 'provider-id-123' });// The result holds sensitive values: use it without logging it.signInWithPhoneNumber
Section intitulée « signInWithPhoneNumber »Lance le flux de connexion par numéro de téléphone.
Utilisez le phoneVerificationCompleted écouteur pour être notifié lorsque la vérification est terminée.
Utilisez le phoneVerificationFailed écouteur pour être notifié en cas d'échec de la vérification.
Utilisez le phoneCodeSent écouteur pour obtenir l'ID de vérification.
Disponible uniquement pour Android et iOS.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.signInWithPhoneNumber({ phoneNumber: "+16505550101" });signInWithPlayGames
Section intitulée « signInWithPlayGames »Lance le flux de connexion Play Games.
Disponible uniquement pour Android.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithPlayGames();// The result holds sensitive values: use it without logging it.signInWithTwitter
Section intitulée « signInWithTwitter »Lance le flux de connexion Twitter.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithTwitter();// The result holds sensitive values: use it without logging it.signInWithYahoo
Section intitulée « signInWithYahoo »Lance le flux de connexion Yahoo.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithYahoo();// The result holds sensitive values: use it without logging it.Lance le flux de déconnexion.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.signOut();Dissocie un fournisseur d’un compte utilisateur.
import { FirebaseAuthentication, ProviderId } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.unlink({ providerId: ProviderId.APPLE });// The result holds sensitive values: use it without logging it.updateEmail
Section intitulée « updateEmail »Met à jour l’adresse e-mail de l’utilisateur connecté.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.updateEmail({ newEmail: 'user@example.com' });updatePassword
Section intitulée « updatePassword »Met à jour le mot de passe de l’utilisateur connecté.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.updatePassword({ newPassword: 'new-password' });updateProfile
Section intitulée « updateProfile »Met à jour les données du profil utilisateur.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.updateProfile({ displayName: 'display', photoUrl: 'https://example.com',});useAppLanguage
Section intitulée « useAppLanguage »Définit la langue d'affichage code comme langue par défaut de l'application.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.useAppLanguage();useEmulator
Section intitulée « useEmulator »Configure votre application pour communiquer avec l'émulateur Authentication.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.useEmulator({ host: "127.0.0.1" });verifyBeforeUpdateEmail
Section intitulée « verifyBeforeUpdateEmail »Vérifie la nouvelle adresse e-mail avant de mettre à jour l'adresse e-mail de l'utilisateur actuellement connecté.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.verifyBeforeUpdateEmail({ newEmail: 'user@example.com' });checkAppTrackingTransparencyPermission
Section intitulée « checkAppTrackingTransparencyPermission »Vérifie le statut actuel de l'App Tracking Transparency.
Disponible uniquement sur iOS.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.checkAppTrackingTransparencyPermission();console.log(result);requestAppTrackingTransparencyPermission
Section intitulée « requestAppTrackingTransparencyPermission »Ouvre la boîte de dialogue système pour autoriser l'App Tracking Transparency.
Attention : L’utilisateur a peut-être désactivé la demande de suivi dans les paramètres de l’appareil, voir Documentation d’Apple.
Disponible uniquement sur iOS.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.requestAppTrackingTransparencyPermission();console.log(result);Référence de type
Section intitulée « Référence de type »ApplyActionCodeOptions
Section intitulée « ApplyActionCodeOptions »export interface ApplyActionCodeOptions { /** * A verification code sent to the user. * * @since 0.2.2 */ oobCode: string;}ConfirmPasswordResetOptions
Section intitulée « ConfirmPasswordResetOptions »export interface ConfirmPasswordResetOptions { /** * A verification code sent to the user. * * @since 0.2.2 */ oobCode: string; /** * The new password. * * @since 0.2.2 */ newPassword: string;}ConfirmVerificationCodeOptions
Section intitulée « ConfirmVerificationCodeOptions »export interface ConfirmVerificationCodeOptions { /** * The verification ID received from the `phoneCodeSent` listener. * * The `verificationCode` option must also be provided. * * @since 5.0.0 */ verificationId: string; /** * The verification code either received from the `phoneCodeSent` listener or entered by the user. * * The `verificationId` option must also be provided. * * @since 5.0.0 */ verificationCode: string;}SignInResult
Section intitulée « SignInResult »export interface SignInResult { /** * The currently signed-in user, or null if there isn't any. * * @since 0.1.0 */ user: User | null; /** * Credentials returned by an auth provider. * * @since 0.1.0 */ credential: AuthCredential | null; /** * Additional user information from a federated identity provider. * * @since 0.5.1 */ additionalUserInfo: AdditionalUserInfo | null;}CreateUserWithEmailAndPasswordOptions
Section intitulée « CreateUserWithEmailAndPasswordOptions »export interface CreateUserWithEmailAndPasswordOptions { /** * @since 0.2.2 */ email: string; /** * @since 0.2.2 */ password: string;}FetchSignInMethodsForEmailOptions
Section intitulée « FetchSignInMethodsForEmailOptions »export interface FetchSignInMethodsForEmailOptions { /** * The user's email address. * * @since 6.0.0 */ email: string;}FetchSignInMethodsForEmailResult
Section intitulée « FetchSignInMethodsForEmailResult »export interface FetchSignInMethodsForEmailResult { /** * The sign-in methods for the specified email address. * * This list is empty when [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) * is enabled, irrespective of the number of authentication methods available for the given email. * * @since 6.0.0 */ signInMethods: string[];}GetCurrentUserResult
Section intitulée « GetCurrentUserResult »export interface GetCurrentUserResult { /** * The currently signed-in user, or null if there isn't any. * * @since 0.1.0 */ user: User | null;}GetIdTokenOptions
Section intitulée « GetIdTokenOptions »export interface GetIdTokenOptions { /** * Force refresh regardless of token expiration. * * @since 0.1.0 */ forceRefresh: boolean;}GetIdTokenResult
Section intitulée « GetIdTokenResult »export interface GetIdTokenResult { /** * The Firebase Auth ID token JWT string. * * @since 0.1.0 */ token: string;}GetIdTokenResultOptions
Section intitulée « GetIdTokenResultOptions »export interface GetIdTokenResultOptions { /** * Force refresh regardless of token expiration. * * @since 7.4.0 */ forceRefresh: boolean;}GetIdTokenResultResult
Section intitulée « GetIdTokenResultResult »export interface GetIdTokenResultResult { /** * The authentication time in milliseconds since the epoch. * * This is the time the user authenticated (signed in) and not the time the token was refreshed. * * @since 7.4.0 */ authTime: number; /** * The ID token expiration time in milliseconds since the epoch. * * @since 7.4.0 */ expirationTime: number; /** * The ID token issuance time in milliseconds since the epoch. * * @since 7.4.0 */ issuedAtTime: number; /** * The sign-in provider through which the ID token was obtained. * * @since 7.4.0 */ signInProvider: string | null; /** * The type of second factor associated with this session, provided the user was multi-factor * authenticated (eg. phone, etc). * * @since 7.4.0 */ signInSecondFactor: string | null; /** * The entire payload claims of the ID token including the standard reserved claims as well as * the custom claims. * * @since 7.4.0 */ claims: Record<string, unknown>;}Source de vérité
Section intitulée « Source de vérité »Cette page est générée à partir de src/definitions.ts. Relancez la synchronisation lorsque l’API public change en amont.
Continuer depuis Getting Started
Section intitulée « Continuer après Prise en main »Si vous utilisez Prise en main pour planifier les flux d'authentification et de compte, le connecter à @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 @capgo/capacitor-native-biometric pour les détails d'implémentation dans @capgo/capacitor-native-biometric, Authentification à deux facteurs pour les détails d'implémentation dans l'authentification à deux facteurs, et SSO (Entreprise) pour les détails d'implémentation dans le SSO (Enterprise).