Getting Started
Einen Setup-Vorschlag mit den Installationsanweisungen und der vollständigen Markdown-Guideline für diesen Plugin kopieren.
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.
Installieren
Abschnitt mit dem Titel „Installieren“Sie können unsere AI-gestützte Einrichtung verwenden, um das Plugin zu installieren. Fügen Sie die Capgo Fähigkeiten Ihrem AI-Tool mit der folgenden Befehl hinzu:
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-pluginsDann verwenden Sie den folgenden Prompt:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-firebase-authentication` plugin in my project.Wenn Sie die manuelle Einrichtung bevorzugen, installieren Sie das Plugin, indem Sie die folgenden Befehle ausführen und die darunter angegebenen Plattform-spezifischen Anweisungen befolgen:
bun add @capgo/capacitor-firebase-authenticationbunx cap syncImportieren
Abschnitt mit dem Titel „Importieren“import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';API Übersicht
Abschnitt mit dem Titel „API Übersicht“applyActionCode
Abschnitt mit dem Titel „applyActionCode“Eine Bestätigung des code sendet, die dem Benutzer per E-Mail zugesandt wurde.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.applyActionCode({ oobCode: 'oob-code' });confirmPasswordReset
Abschnitt mit dem Titel „confirmPasswordReset“Abschließt den Passwortschutzprozess.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.confirmPasswordReset({ oobCode: 'oob-code', newPassword: 'new-password',});confirmVerificationCode
Abschnitt mit dem Titel “confirmVerificationCode”Abschließt den Telefonnummernverifizierungsprozess.
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
Abschnitt mit dem Titel “createUserWithEmailAndPassword”Erstellt ein neues Benutzerkonto mit E-Mail-Adresse und Passwort. Wenn das neue Konto erstellt wurde, wird der Benutzer automatisch eingeloggt.
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
Abschnitt mit dem Titel “deleteUser”Löscht und meldet den Benutzer ab.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.deleteUser();fetchSignInMethodsForEmail
Abschnitt mit dem Titel “fetchSignInMethodsForEmail”Holt die Anmeldemethoden für eine E-Mail-Adresse.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.fetchSignInMethodsForEmail({ email: 'user@example.com' });console.log(result);getCurrentUser
Abschnitt mit dem Titel “getCurrentUser”Liefert den derzeit angemeldeten Benutzer.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.getCurrentUser();// The result holds sensitive values: use it without logging it.getPendingAuthResult
Abschnitt mit dem Titel “getPendingAuthResult”Gibt die SignInResult wenn Ihre App eine Web-Anmeldeflow gestartet hat und das Betriebssystem die App während des Hintergrunds bereinigt.
Nur für Android verfügbar.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.getPendingAuthResult();// The result holds sensitive values: use it without logging it.getIdToken
Abschnitt mit dem Titel “getIdToken”Liefert den Firebase Auth ID Token für den derzeit angemeldeten Benutzer.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.getIdToken();// The result holds sensitive values: use it without logging it.getIdTokenResult
Abschnitt mit dem Titel “getIdTokenResult”Rückgibt ein deserialisiertes JSON-Web-Token (JWT), das verwendet wird, um den Benutzer bei einem Firebase-Dienst zu identifizieren.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.getIdTokenResult();// The result holds sensitive values: use it without logging it.getRedirectResult
Abschnitt mit dem Titel “getRedirectResult”Rückgibt das SignInResult aus dem redirect-basierten Anmeldeprozess.
Wenn die Anmeldung fehlschlägt, fehlschlägt sie mit einem Fehler. Wenn keine Redirect-Operation aufgerufen wurde, wird ein SignInResult mit einem nullen Benutzer zurückgegeben.
Nur für Web verfügbar.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.getRedirectResult();// The result holds sensitive values: use it without logging it.getTenantId
Abschnitt mit dem Titel “getTenantId”Ermitteln Sie die Tenant-ID.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.getTenantId();console.log(result);isSignInWithEmailLink
Abschnitt mit dem Titel “isSignInWithEmailLink”Überprüft, ob ein eingehendes Link ein Anmelden mit E-Mail-Link ist, der für 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
Abschnitt mit dem Titel “linkWithApple”Verbindet das Benutzerkonto mit dem Apple-Authentifizierungsanbieter.
Der Benutzer muss auf der native Ebene angemeldet sein.
Die skipNativeAuth Konfigurationsoption hat hier keinen Einfluss.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithApple();// The result holds sensitive values: use it without logging it.linkWithEmailAndPassword
Abschnitt mit dem Titel “linkWithEmailAndPassword”Verbindet das Benutzerkonto mit dem E-Mail-Authentifizierungsanbieter.
Der Benutzer muss auf der native Ebene angemeldet sein.
Die skipNativeAuth Konfigurationsoption hat hier keinen Einfluss.
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
Abschnitt mit dem Titel “linkWithEmailLink”Verknüpft das Benutzerkonto mit dem E-Mail-Authentifizierungsanbieter.
Der Benutzer muss auf der native Ebene angemeldet sein.
Die skipNativeAuth Konfigurationsoption hat hier keinen Einfluss.
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
Abschnitt mit dem Titel “linkWithFacebook”Verknüpft das Benutzerkonto mit dem Facebook-Authentifizierungsanbieter.
Der Benutzer muss auf der native Ebene angemeldet sein.
Die skipNativeAuth Konfigurationsoption hat hier keinen Einfluss.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithFacebook();// The result holds sensitive values: use it without logging it.linkWithGameCenter
Abschnitt mit dem Titel “linkWithGameCenter”Verbindet das Benutzerkonto mit dem Game Center-Authentifizierungsanbieter.
Der Benutzer muss auf der native Layer angemeldet sein.
Der skipNativeAuth Diese Konfigurationsoption hat hier keinen Einfluss.
Nur für iOS verfügbar.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithGameCenter();// The result holds sensitive values: use it without logging it.linkWithGithub
Abschnitt mit dem Titel “linkWithGithub”Verbindet das Benutzerkonto mit GitHub-Authentifizierungsanbieter.
Der Benutzer muss auf der native Layer angemeldet sein.
Der skipNativeAuth Diese Konfigurationsoption hat hier keinen Einfluss.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithGithub();// The result holds sensitive values: use it without logging it.linkWithGoogle
Abschnitt mit dem Titel “linkWithGoogle”Verbindet das Benutzerkonto mit dem Google-Authentifizierungsanbieter.
Der Benutzer muss sich auf der native Ebene angemeldet haben.
Der skipNativeAuth Diese Konfigurationsoption hat hier keinen Einfluss.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithGoogle();// The result holds sensitive values: use it without logging it.linkWithMicrosoft
Abschnitt mit dem Titel “linkWithMicrosoft”Verbindet das Benutzerkonto mit dem Microsoft-Authentifizierungsanbieter.
Der Benutzer muss sich auf der native Ebene angemeldet haben.
Der skipNativeAuth Diese Konfigurationsoption hat hier keinen Einfluss.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithMicrosoft();// The result holds sensitive values: use it without logging it.linkWithOpenIdConnect
Abschnitt mit dem Titel “linkWithOpenIdConnect”Verbindet das Benutzerkonto mit einem OpenID-Connect-Anbieter.
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
Abschnitt mit dem Titel “linkWithPhoneNumber”Verbindet das Benutzerkonto mit der Telefonnummer-Authentifizierungsanbieter.
Der Benutzer muss sich auf der native Ebene angemeldet haben. skipNativeAuth Die Konfigurationsoption hat hier keinen Einfluss.
Verwende den phoneVerificationCompleted Hörer, um benachrichtigt zu werden, wenn die Verifizierung abgeschlossen ist. phoneVerificationFailed Hörer, um benachrichtigt zu werden, wenn die Verifizierung fehlgeschlagen ist. phoneCodeSent Hörer, um den Verifizierungscode zu erhalten.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.linkWithPhoneNumber({ phoneNumber: "+16505550101" });linkWithPlayGames
Abschnitt mit dem Titel “linkWithPlayGames”Verbindet das Benutzerkonto mit dem Play Games-Authentifizierungsanbieter.
Der Benutzer muss sich auf der native Ebene angemeldet haben. skipNativeAuth Die Konfigurationsoption hat hier keinen Einfluss.
Nur für Android verfügbar.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithPlayGames();// The result holds sensitive values: use it without logging it.linkWithTwitter
Abschnitt mit dem Titel „linkWithTwitter“Verknüpft das Benutzerkonto mit dem Twitter-Authentifizierungsanbieter.
Der Benutzer muss auf der native Ebene angemeldet sein.
Die skipNativeAuth Konfigurationsoption hat hier keinen Einfluss.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithTwitter();// The result holds sensitive values: use it without logging it.linkWithYahoo
Abschnitt mit dem Titel „linkWithYahoo“Verknüpft das Benutzerkonto mit dem Yahoo-Authentifizierungsanbieter.
Der Benutzer muss auf der native Ebene angemeldet sein.
Die skipNativeAuth Konfigurationsoption hat hier keinen Einfluss.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.linkWithYahoo();// The result holds sensitive values: use it without logging it.Aktualisiert Benutzerkontodaten, wenn angemeldet.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.reload();revokeAccessToken
Abschnitt mit Titel “AccessToken widerrufen”Widerruft den angegebenen Zugriffstoken. Aktuell nur Apple OAuth-Zugriffstoken unterstützt.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.revokeAccessToken({ token: 'token-123' });sendEmailVerification
Abschnitt mit Titel “E-Mail-Verifizierung senden”Sendet eine Verifizierungs-E-Mail an den derzeit angemeldeten Benutzer.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.sendEmailVerification();sendPasswordResetEmail
Abschnitt mit Titel “Passwort zurücksetzen”Sendet eine E-Mail zur Passwort-Neudefinition.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.sendPasswordResetEmail({ email: 'user@example.com' });sendSignInLinkToEmail
Abschnitt mit dem Titel “sendSignInLinkToEmail”Sendet einen Anmelde-Link per E-Mail an den Benutzer mit der angegebenen E-Mail-Adresse.
Um den Anmeldevorgang mit dem E-Mail-Link abzuschließen, rufen Sie signInWithEmailLink mit der E-Mail-Adresse und dem E-Mail-Link auf, der dem Benutzer in der E-Mail zugesendet wurde.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.sendSignInLinkToEmail({ email: 'user@example.com', actionCodeSettings: { url: 'https://example.com' },});setLanguageCode
Abschnitt mit dem Titel “setLanguageCode”Setzt die Benutzerfassungssprache code für Auth-Bereiche.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.setLanguageCode({ languageCode: "en-US" });setPersistence
Abschnitt mit dem Titel “setPersistence”Setzt den Typ der Persistenz für die derzeit gespeicherte Auth-Sitzung.
Nur für Web verfügbar.
import { FirebaseAuthentication, Persistence } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.setPersistence({ persistence: Persistence.IndexedDbLocal });setTenantId
Abschnitt mit dem Titel “setTenantId”Setzt die Tenant-ID.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.setTenantId({ tenantId: 'tenant-id-123' });signInAnonymously
Abschnitt mit dem Titel “signInAnonymously”Als anonymer Benutzer anmelden.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInAnonymously();// The result holds sensitive values: use it without logging it.signInWithApple
Abschnitt mit dem Titel “signInWithApple”Startet den Apple-Anmeldungsfluss.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithApple();// The result holds sensitive values: use it without logging it.signInWithCustomToken
Abschnitt mit dem Titel “signInWithCustomToken”Startet den Custom Token-Anmeldungsfluss.
Dieser Methode kann nicht in Combination mit skipNativeAuth auf Android- und iOS-Geräten.
In diesem Fall müssen Sie die signInWithCustomToken direkt an der Firebase JS SDK-Schnittstelle verwenden.
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
Abschnitt mit dem Titel „signInWithEmailAndPassword“Startet den Anmeldeprozess mithilfe einer E-Mail-Adresse und eines Passworts.
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
Abschnitt mit dem Titel „signInWithEmailLink“Mithilfe eines E-Mail-Kontos und eines E-Mail-Anmelde-Link.
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
Abschnitt mit dem Titel „signInWithFacebook“Startet das Facebook-Anmeldeverfahren.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithFacebook();// The result holds sensitive values: use it without logging it.signInWithGameCenter
Abschnitt mit dem Titel “signInWithGameCenter”Startet den Game Center-Anmeldefluss.
Verfügbar nur für iOS.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithGameCenter();// The result holds sensitive values: use it without logging it.signInWithGithub
Abschnitt mit dem Titel “signInWithGithub”Startet den GitHub-Anmeldefluss.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithGithub();// The result holds sensitive values: use it without logging it.signInWithGoogle
Abschnitt mit dem Titel “signInWithGoogle”Startet den Google-Anmeldefluss.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithGoogle();// The result holds sensitive values: use it without logging it.signInWithMicrosoft
Abschnitt mit dem Titel “signInWithMicrosoft”Startet den Microsoft-Anmeldefluss.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithMicrosoft();// The result holds sensitive values: use it without logging it.signInWithOpenIdConnect
Abschnitt mit dem Titel “signInWithOpenIdConnect”Der OpenID-Connect-Anmeldeprozess wird gestartet.
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
Abschnitt mit dem Titel “signInWithPhoneNumber”Der Anmeldeprozess mit einer Telefonnummer wird gestartet.
Verwende das phoneVerificationCompleted Hörer, der benachrichtigt wird, wenn die Überprüfung abgeschlossen ist.\nVerwenden Sie phoneVerificationFailed Hinweis-Listener, um benachrichtigt zu werden, wenn die Überprüfung fehlschlägt. phoneCodeSent Nur für Android und iOS verfügbar.
Nur für Android und iOS verfügbar.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.signInWithPhoneNumber({ phoneNumber: "+16505550101" });signInWithPlayGames
Abschnitt mit dem Titel “signInWithPlayGames”Startet den Anmeldefluss für Play Games.
Nur für Android verfügbar.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithPlayGames();// The result holds sensitive values: use it without logging it.signInWithTwitter
Abschnitt mit dem Titel “signInWithTwitter”Startet den Anmeldefluss für Twitter.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithTwitter();// The result holds sensitive values: use it without logging it.signInWithYahoo
Abschnitt mit dem Titel “signInWithYahoo”Startet den Anmeldefluss für Yahoo.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.signInWithYahoo();// The result holds sensitive values: use it without logging it.Startet den Abmeldefluss.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.signOut();Entkoppelt einen Anbieter von einem Benutzerkonto.
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.Aktualisiert die E-Mail-Adresse des aktuellen angemeldeten Benutzers.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.updateEmail({ newEmail: 'user@example.com' });updatePassword
Abschnitt mit dem Titel „Passwort aktualisieren“Aktualisiert das Passwort des aktuellen angemeldeten Benutzers.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.updatePassword({ newPassword: 'new-password' });Aktualisiert die Benutzerprofil-Daten.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.updateProfile({ displayName: 'display', photoUrl: 'https://example.com',});useAppLanguage
Abschnitt mit dem Titel “useAppLanguage”Setzt die Benutzerfachsprache code als Standardanwendungsprache.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.useAppLanguage();useEmulator
Abschnitt mit dem Titel “useEmulator”Instrumentiert die Anwendung, um mit dem Authentifizierungsimulator zu kommunizieren.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.useEmulator({ host: "127.0.0.1" });verifyBeforeUpdateEmail
Abschnitt mit dem Titel “verifyBeforeUpdateEmail”Überprüft die neue E-Mail-Adresse, bevor die E-Mail-Adresse des aktuellen angemeldeten Benutzers aktualisiert wird.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.verifyBeforeUpdateEmail({ newEmail: 'user@example.com' });checkAppTrackingTransparencyPermission
Abschnitt mit dem Titel “checkAppTrackingTransparencyPermission”Überprüft den aktuellen Status der Anwendungsverfolgungstransparenz.
Nur auf iOS verfügbar.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.checkAppTrackingTransparencyPermission();console.log(result);requestAppTrackingTransparencyPermission
Abschnitt mit dem Titel „requestAppTrackingTransparencyPermission“Öffnet das Systemdialogfeld, um die App-Tracking-Transparenz zu autorisieren.
Achtung: Der Benutzer hat möglicherweise die Trackinganfrage in den Geräte-Einstellungen deaktiviert, siehe Dokumentation von Apple.
Nur auf iOS verfügbar.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
const result = await FirebaseAuthentication.requestAppTrackingTransparencyPermission();console.log(result);Typenreferenz
Abschnitt mit dem Titel „Typenreferenz“ApplyActionCodeOptions
Abschnitt mit dem Titel „ApplyActionCodeOptions“export interface ApplyActionCodeOptions { /** * A verification code sent to the user. * * @since 0.2.2 */ oobCode: string;}ConfirmPasswordResetOptions
Abschnitt mit dem Titel “Bestätige Passwort-Restitutionsoptionen”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
Abschnitt mit dem Titel “Bestätige Verifizierungscode-Optionen”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
Abschnitt mit dem Titel “Anmeldedaten”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
Benennung "CreateUserWithEmailAndPasswordOptions"export interface CreateUserWithEmailAndPasswordOptions { /** * @since 0.2.2 */ email: string; /** * @since 0.2.2 */ password: string;}FetchSignInMethodsForEmailOptions
Abschnitt mit dem Titel “FetchSignInMethodsForEmailOptions”export interface FetchSignInMethodsForEmailOptions { /** * The user's email address. * * @since 6.0.0 */ email: string;}FetchSignInMethodsForEmailResult
Abschnitt mit dem Titel “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
Abschnitt mit dem Titel “GetCurrentUserResult”export interface GetCurrentUserResult { /** * The currently signed-in user, or null if there isn't any. * * @since 0.1.0 */ user: User | null;}GetIdTokenOptions
Abschnitt mit dem Titel “GetIdTokenOptions”export interface GetIdTokenOptions { /** * Force refresh regardless of token expiration. * * @since 0.1.0 */ forceRefresh: boolean;}GetIdTokenResult
Abschnitt mit dem Titel “GetIdTokenResult”export interface GetIdTokenResult { /** * The Firebase Auth ID token JWT string. * * @since 0.1.0 */ token: string;}GetIdTokenResultOptions
Abschnitt mit dem Titel “GetIdTokenResultOptions”export interface GetIdTokenResultOptions { /** * Force refresh regardless of token expiration. * * @since 7.4.0 */ forceRefresh: boolean;}GetIdTokenResultResult
Abschnitt mit dem Titel “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>;}Quelle der Wahrheit
Abschnitt mit dem Titel “Quelle der Wahrheit”Diese Seite wurde aus dem Plugin generiert. src/definitions.tsRe-run die Synchronisierung, wenn die öffentliche API sich im Hintergrund ändert.
Fortsetzen Sie mit Getting Started
Abschnitt mit dem Titel “Fortsetzen Sie mit Getting Started”Wenn Sie sich für die Verwendung von Getting Started um die Authentifizierung und die Kontenflüsse zu planen, mit ihm zu verbinden @capgo/capacitor-Social-Login um die Implementierungsdetails in @capgo/capacitor-social-login zu erhalten. @capgo/capacitor-Passkey um die Implementierungsdetails in @capgo/capacitor-passkey zu erhalten. @capgo/capacitor-native-biometrisch für die Implementierungsdetails in @capgo/capacitor-native-biometrisch Zweifaktor-Authentifizierung für die Implementierungsdetails in Zweifaktor-Authentifizierung und SSO (Unternehmen) für die Implementierungsdetails in SSO (Unternehmen).