Per iniziare
Copia un prompt di configurazione con i passaggi di installazione e la guida markdown completa per questo 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.
Puoi usare il nostro setup assistito dall'IA per installare il plugin. Aggiungi le skill Capgo al tuo strumento di IA usando il seguente comando:
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-pluginsPoi usa il seguente prompt:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-firebase-authentication` plugin in my project.Se preferisci la configurazione manuale, installa il plugin eseguendo questi comandi e segui le istruzioni specifiche per piattaforma qui sotto:
bun add @capgo/capacitor-firebase-authenticationnpx cap syncImporta
Sezione intitolata “Import”import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';Avvio rapido
Sezione intitolata “Quick start”import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.applyActionCode({ oobCode: 'oob-code' });Esempio: confirmPasswordReset
Sezione intitolata “Example: confirmPasswordReset”import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.confirmPasswordReset({ oobCode: 'oob-code', newPassword: 'new-password',});Esempio: confirmVerificationCode
Sezione intitolata “Example: 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.Errori comuni
Sezione intitolata “Errori comuni”- Listener: rimuovi gli handle quando gli schermi vengono smontati.
- Sync nativo: esegui
npx cap syncdopo gli aggiornamenti dei plugin. - Fonte di verità: fidati
src/definitions.tsnel repo GitHub.
Panoramica API
Sezione intitolata “Panoramica API”applyActionCode
Sezione intitolata “applyActionCode”Applica un code di verifica inviato all'utente via email.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.applyActionCode({ oobCode: 'oob-code' });confirmPasswordReset
Sezione intitolata “confirmPasswordReset”Completa la procedura di reset della password.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.confirmPasswordReset({ oobCode: 'oob-code', newPassword: 'new-password',});confirmVerificationCode
Sezione intitolata “confirmVerificationCode”Conclude la verifica del numero di telefono.
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
Sezione intitolata “createUserWithEmailAndPassword”Crea un nuovo account utente con email e password. Se l'account viene creato, l'utente effettua automaticamente il login.
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
Sezione intitolata “deleteUser”Elimina l'utente e effettua il logout.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.deleteUser();fetchSignInMethodsForEmail
Sezione intitolata “fetchSignInMethodsForEmail”Recupera i metodi di sign-in per un indirizzo email.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.fetchSignInMethodsForEmail({ email: 'user@example.com' });console.log(result);getCurrentUser
Sezione intitolata “getCurrentUser”Recupera l'utente attualmente loggato.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.getCurrentUser();// The result holds sensitive values: use it without logging it.getPendingAuthResult
Sezione intitolata “getPendingAuthResult”Restituisce il SignInResult se la tua app ha avviato un flusso di login web e l'OS chiude l'app mentre è in background.
Disponibile solo per Android.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.getPendingAuthResult();// The result holds sensitive values: use it without logging it.getIdToken
Sezione intitolata “getIdToken”Recupera l'ID Token di Firebase Auth per l'utente attualmente autenticato.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.getIdToken();// The result holds sensitive values: use it without logging it.getIdTokenResult
Sezione intitolata “getIdTokenResult”Restituisce un JSON Web Token (JWT) deserializzato, utilizzato per identificare l'utente presso un servizio Firebase.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.getIdTokenResult();// The result holds sensitive values: use it without logging it.getRedirectResult
Sezione intitolata “getRedirectResult”Restituisce il SignInResult dal flusso di autenticazione basato su redirect.
Se l'autenticazione fallisce, restituisce un errore.
Se non è stata chiamata alcuna operazione di redirect, restituisce un SignInResult con un utente null.
Disponibile solo per il Web.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.getRedirectResult();// The result holds sensitive values: use it without logging it.getTenantId
Sezione intitolata “getTenantId”Ottieni il tenant id.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.getTenantId();console.log(result);isSignInWithEmailLink
Sezione intitolata “isSignInWithEmailLink”Verifica se il link in arrivo è un sign-in con email link adatto per 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
Sezione intitolata “linkWithApple”Collega l'account utente con il provider di autenticazione Apple.
L'utente deve essere loggato nel layer nativo.
Il skipNativeAuth l'opzione di configurazione non ha effetto qui.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithApple();// The result holds sensitive values: use it without logging it.linkWithEmailAndPassword
Sezione intitolata “linkWithEmailAndPassword”Collega l'account utente al provider di autenticazione Email.
L'utente deve essere loggato nel layer nativo.
Il skipNativeAuth l'opzione di configurazione non ha effetto qui.
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
Sezione intitolata “linkWithEmailLink”Collega l'account utente al provider di autenticazione Email.
L'utente deve essere loggato nel layer nativo.
Il skipNativeAuth l'opzione di configurazione non ha effetto qui.
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
Sezione intitolata “linkWithFacebook”Collega l'account utente al provider di autenticazione Facebook.
L'utente deve essere loggato nel layer nativo.
Il skipNativeAuth l'opzione di configurazione non ha effetto qui.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithFacebook();// The result holds sensitive values: use it without logging it.linkWithGameCenter
Sezione intitolata “linkWithGameCenter”Collega l'account utente al provider di autenticazione Game Center.
L'utente deve essere loggato nel layer nativo.
Il skipNativeAuth l'opzione di configurazione non ha effetto qui.
Disponibile solo per iOS.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithGameCenter();// The result holds sensitive values: use it without logging it.linkWithGithub
Sezione intitolata “linkWithGithub”Collega l'account utente al provider di autenticazione GitHub.
L'utente deve essere loggato nel layer nativo.
Il skipNativeAuth l'opzione di configurazione non ha effetto qui.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithGithub();// The result holds sensitive values: use it without logging it.linkWithGoogle
Sezione intitolata “linkWithGoogle”Collega l'account utente al provider di autenticazione Google.
L'utente deve essere loggato nel layer nativo.
Il skipNativeAuth l'opzione di configurazione non ha effetto qui.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithGoogle();// The result holds sensitive values: use it without logging it.linkWithMicrosoft
Sezione intitolata “linkWithMicrosoft”Collega l'account utente al provider di autenticazione Microsoft.
L'utente deve essere loggato nel layer nativo.
Il skipNativeAuth l'opzione di configurazione non ha effetto qui.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithMicrosoft();// The result holds sensitive values: use it without logging it.linkWithOpenIdConnect
Sezione intitolata “linkWithOpenIdConnect”Collega l'account utente a un provider 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
Sezione intitolata “linkWithPhoneNumber”Collega l'account utente al provider di autenticazione tramite numero di telefono.
L'utente deve essere loggato nel layer nativo.
Il skipNativeAuth l'opzione di configurazione non ha effetto qui.
Usa il phoneVerificationCompleted listener per ricevere una notifica al completamento della verifica.
Usa il phoneVerificationFailed listener per ricevere una notifica quando la verifica fallisce.
Usa il phoneCodeSent listener per ottenere l'ID della verifica.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.linkWithPhoneNumber({ phoneNumber: "+16505550101" });linkWithPlayGames
Sezione intitolata “linkWithPlayGames”Collega l'account utente al provider di autenticazione Play Games.
L'utente deve essere loggato nel layer nativo.
Il skipNativeAuth l'opzione di configurazione non ha effetto qui.
Disponibile solo per Android.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithPlayGames();// The result holds sensitive values: use it without logging it.linkWithTwitter
Sezione intitolata “linkWithTwitter”Collega l'account utente al provider di autenticazione Twitter.
L'utente deve essere loggato nel layer nativo.
Il skipNativeAuth l'opzione di configurazione non ha effetto qui.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithTwitter();// The result holds sensitive values: use it without logging it.linkWithYahoo
Sezione intitolata “linkWithYahoo”Collega l'account utente al provider di autenticazione Yahoo.
L'utente deve essere loggato nel layer nativo.
Il skipNativeAuth l'opzione di configurazione non ha effetto qui.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithYahoo();// The result holds sensitive values: use it without logging it.Ricarica i dati dell'account utente, se l'utente è loggato.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.reload();revokeAccessToken
Sezione intitolata “revokeAccessToken”Revoca l'access token indicato. Al momento supporta solo gli access token Apple OAuth.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.revokeAccessToken({ token: 'token-123' });sendEmailVerification
Sezione intitolata “sendEmailVerification”Invia un'email di verifica all'utente attualmente autenticato.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.sendEmailVerification();sendPasswordResetEmail
Sezione intitolata “sendPasswordResetEmail”Invia un'email per il reset della password.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.sendPasswordResetEmail({ email: 'user@example.com' });sendSignInLinkToEmail
Sezione intitolata “sendSignInLinkToEmail”Invia all'utente un link di accesso via email con l'indirizzo specificato.
Per completare l'accesso tramite link email, chiama signInWithEmailLink con l'indirizzo email e il link forniti nell'email inviata all'utente.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.sendSignInLinkToEmail({ email: 'user@example.com', actionCodeSettings: { url: 'https://example.com' },});setLanguageCode
Sezione intitolata “setLanguageCode”Imposta la lingua code mostrata all'utente per le operazioni di auth.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.setLanguageCode({ languageCode: "en-US" });setPersistence
Sezione intitolata “setPersistence”Imposta il tipo di persistenza per la sessione auth salvata.
Disponibile solo per il Web.
import { FirebaseAuthentication, Persistence } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.setPersistence({ persistence: Persistence.IndexedDbLocal });setTenantId
Sezione intitolata “setTenantId”Imposta il tenant id.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.setTenantId({ tenantId: 'tenant-id-123' });signInAnonymously
Sezione intitolata “signInAnonymously”Effettua l'accesso come utente anonimo.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInAnonymously();// The result holds sensitive values: use it without logging it.signInWithApple
Sezione intitolata “signInWithApple”Avvia il flusso di accesso con Apple.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithApple();// The result holds sensitive values: use it without logging it.signInWithCustomToken
Sezione intitolata “signInWithCustomToken”Avvia il flusso di accesso con Custom Token.
Questo metodo non può essere usato insieme a skipNativeAuth su Android e iOS.
In questo caso devi usare l' signInWithCustomToken interfaccia dell'SDK JS di Firebase direttamente.
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
Sezione intitolata “signInWithEmailAndPassword”Avvia il flusso di accesso tramite email e password.
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
Sezione intitolata “signInWithEmailLink”Effettua l'accesso tramite email e link di accesso.
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
Sezione intitolata “signInWithFacebook”Avvia il flusso di accesso con Facebook.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithFacebook();// The result holds sensitive values: use it without logging it.signInWithGameCenter
Sezione intitolata “signInWithGameCenter”Avvia il flusso di accesso con Game Center.
Disponibile solo per iOS.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithGameCenter();// The result holds sensitive values: use it without logging it.signInWithGithub
Sezione intitolata “signInWithGithub”Avvia il flusso di sign-in di GitHub.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithGithub();// The result holds sensitive values: use it without logging it.signInWithGoogle
Sezione intitolata “signInWithGoogle”Avvia il flusso di accesso con Google.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithGoogle();// The result holds sensitive values: use it without logging it.signInWithMicrosoft
Sezione intitolata “signInWithMicrosoft”Avvia il flusso di accesso con Microsoft.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithMicrosoft();// The result holds sensitive values: use it without logging it.signInWithOpenIdConnect
Sezione intitolata “signInWithOpenIdConnect”Avvia il flusso di accesso con 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
Sezione intitolata “signInWithPhoneNumber”Avvia il flusso di accesso tramite numero di telefono.
Usa il phoneVerificationCompleted listener per ricevere una notifica al completamento della verifica.
Usa il phoneVerificationFailed listener per ricevere una notifica quando la verifica fallisce.
Usa il phoneCodeSent listener per ottenere l'ID della verifica.
Disponibile solo per Android e iOS.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.signInWithPhoneNumber({ phoneNumber: "+16505550101" });signInWithPlayGames
Sezione intitolata “signInWithPlayGames”Avvia il flusso di login con Play Games.
Disponibile solo per Android.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithPlayGames();// The result holds sensitive values: use it without logging it.signInWithTwitter
Sezione intitolata “signInWithTwitter”Avvia il flusso di login con Twitter.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithTwitter();// The result holds sensitive values: use it without logging it.signInWithYahoo
Sezione: “signInWithYahoo”Avvia il flusso di login con Yahoo.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithYahoo();// The result holds sensitive values: use it without logging it.signOut
Sezione: “signOut”Avvia il flusso di logout.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.signOut();unlink
Sezione: “unlink”Scollega un provider dall'account utente.
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
Sezione: “updateEmail”Aggiorna l'email dell'utente attualmente loggato.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.updateEmail({ newEmail: 'user@example.com' });updatePassword
Sezione intitolata “updatePassword”Aggiorna la password dell'utente attualmente loggato.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.updatePassword({ newPassword: 'new-password' });updateProfile
Sezione intitolata “updateProfile”Aggiorna i dati del profilo utente.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.updateProfile({ displayName: 'display', photoUrl: 'https://example.com',});useAppLanguage
Sezione intitolata “useAppLanguage”Imposta la lingua code come lingua predefinita dell'app.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.useAppLanguage();useEmulator
Sezione intitolata “useEmulator”Configura la tua app per comunicare con l'emulatore di Authentication.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.useEmulator({ host: "127.0.0.1" });verifyBeforeUpdateEmail
Sezione intitolata “verifyBeforeUpdateEmail”Verifica il nuovo indirizzo email prima di aggiornare quello dell'utente loggato.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.verifyBeforeUpdateEmail({ newEmail: 'user@example.com' });checkAppTrackingTransparencyPermission
Sezione intitolata “checkAppTrackingTransparencyPermission”Controlla lo stato attuale di App Tracking Transparency.
Disponibile solo su iOS.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.checkAppTrackingTransparencyPermission();console.log(result);requestAppTrackingTransparencyPermission
Sezione intitolata “requestAppTrackingTransparencyPermission”Apre il dialog di sistema per autorizzare App Tracking Transparency.
Attenzione: L'utente potrebbe aver disabilitato la richiesta di tracciamento nelle impostazioni del dispositivo, vedi Documentazione Apple.
Disponibile solo su iOS.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.requestAppTrackingTransparencyPermission();console.log(result);Riferimento ai tipi
Sezione: “Type Reference”ApplyActionCodeOptions
Sezione intitolata “ApplyActionCodeOptions”export interface ApplyActionCodeOptions { /** * A verification code sent to the user. * * @since 0.2.2 */ oobCode: string;}ConfirmPasswordResetOptions
Sezione intitolata “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
Sezione intitolata “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
Sezione intitolata “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
Sezione: “CreateUserWithEmailAndPasswordOptions”export interface CreateUserWithEmailAndPasswordOptions { /** * @since 0.2.2 */ email: string; /** * @since 0.2.2 */ password: string;}FetchSignInMethodsForEmailOptions
Sezione: “FetchSignInMethodsForEmailOptions”export interface FetchSignInMethodsForEmailOptions { /** * The user's email address. * * @since 6.0.0 */ email: string;}FetchSignInMethodsForEmailResult
Sezione: “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
Sezione: “GetCurrentUserResult”export interface GetCurrentUserResult { /** * The currently signed-in user, or null if there isn't any. * * @since 0.1.0 */ user: User | null;}GetIdTokenOptions
Sezione: “GetIdTokenOptions”export interface GetIdTokenOptions { /** * Force refresh regardless of token expiration. * * @since 0.1.0 */ forceRefresh: boolean;}GetIdTokenResult
Sezione: “GetIdTokenResult”export interface GetIdTokenResult { /** * The Firebase Auth ID token JWT string. * * @since 0.1.0 */ token: string;}GetIdTokenResultOptions
Sezione intitolata “GetIdTokenResultOptions”export interface GetIdTokenResultOptions { /** * Force refresh regardless of token expiration. * * @since 7.4.0 */ forceRefresh: boolean;}GetIdTokenResultResult
Sezione intitolata “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>;}Fonte di verità
Sezione intitolata “Fonte di verità”Questa pagina è generata dal src/definitions.ts. Riesegui la sync quando il API pubblico cambia upstream.
Continua da Getting Started
Sezione intitolata “Continua da Getting Started”Se stai usando Per iniziare per pianificare i flussi di autenticazione e account, collegandolo a @capgo/capacitor-social-login per i dettagli di implementazione in @capgo/capacitor-social-login, @capgo/capacitor-passkey per i dettagli di implementazione in @capgo/capacitor-passkey, @capgo/capacitor-native-biometric per i dettagli di implementazione in @capgo/capacitor-native-biometric, Autenticazione a due fattori per i dettagli di implementazione in Two-factor authentication, e SSO (Enterprise) per i dettagli di implementazione in SSO (Enterprise).