跳过主要内容
返回插件
@capgo/capacitor-firebase-authentication
教程
@capgo/capacitor-firebase-authentication

Firebase Authentication

Capacitor插件用于Firebase Authentication

指南

Firebase身份验证教程

使用@capgo/capacitor-firebase-authentication

Capacitor插件用于Firebase身份验证

安装

bun add @capgo/capacitor-firebase-authentication
bunx cap sync

此插件暴露的内容

  • applyActionCode - 验证通过用户邮箱接收的code。
  • confirmPasswordReset - 完成密码重置流程。
  • confirmVerificationCode - 完成手机验证过程。
  • createUserWithEmailAndPassword - 使用邮箱和密码创建新用户账户。如果新账户创建成功,用户会自动登录。

Example Usage

applyActionCode

Applies a verification code sent to the user by email.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';

await FirebaseAuthentication.applyActionCode({} as ApplyActionCodeOptions);

confirmPasswordReset

完成密码重置过程。

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';

await FirebaseAuthentication.confirmPasswordReset({} as ConfirmPasswordResetOptions);

confirmVerificationCode

完成手机验证过程。

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';

await FirebaseAuthentication.confirmVerificationCode({} as ConfirmVerificationCodeOptions);

createUserWithEmailAndPassword

使用邮箱和密码创建新用户账户。如果新账户创建成功,用户会自动登录。

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';

await FirebaseAuthentication.createUserWithEmailAndPassword({} as CreateUserWithEmailAndPasswordOptions);

Full Reference

从使用@capgo/capacitor-firebase-authentication继续

如果您正在使用 使用@capgo/capacitor-firebase-authentication 来规划身份验证和帐户流程,连接它与 @capgo/capacitor-social-login 的实现细节在@capgo/capacitor-social-login, @capgo/capacitor-passkey 的实现细节在@capgo/capacitor-passkey, @capgo/capacitor-native-biometric 的实现细节在@capgo/capacitor-native-biometric, 双因素身份验证 的实现细节在双因素身份验证, 和 SSO (企业) 了解 SSO (企业版) 的实现细节。