Richtlinie
Tutorial zur Firebase-Authentifizierung
Verwendung von @capgo/capacitor-firebase-authentication
Capacitor-Plugin für Firebase-Authentifizierung
Installieren
bun add @capgo/capacitor-firebase-authentication
bunx cap sync
Was dieses Plugin enthält
applyActionCode- Führt eine Bestätigung code durch, die dem Benutzer per E-Mail gesendet wird.confirmPasswordReset- Fertigt den Passwortschutzprozess ab.confirmVerificationCode- Fertigt den Telefonnummernbestätigungsprozess ab.createUserWithEmailAndPassword- Erstellt ein neues Benutzerkonto mit E-Mail-Adresse und Passwort. Wenn das neue Konto erstellt wurde, wird der Benutzer automatisch angemeldet.
Beispielanwendung
applyActionCode
Eine Bestätigung code wird dem Benutzer per E-Mail zugesendet.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.applyActionCode({} as ApplyActionCodeOptions);
confirmPasswordReset
Abschließt den Passwortschutzprozess.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.confirmPasswordReset({} as ConfirmPasswordResetOptions);
confirmVerificationCode
Beendet den Telefonnummernbestätigungsprozess.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.confirmVerificationCode({} as ConfirmVerificationCodeOptions);
createUserWithEmailAndPassword
Erstellt ein neues Benutzerkonto mit E-Mail-Adresse und Passwort. Wenn das neue Konto erstellt wurde, wird der Benutzer automatisch angemeldet.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.createUserWithEmailAndPassword({} as CreateUserWithEmailAndPasswordOptions);
Vollständige Referenz
- GitHub: https://github.com/Cap-go/capacitor-firebase/tree/main/packages/authentication
- Dokumentation: /docs/plugins/firebase-authentication/