ガイド
Firebase Authenticationのチュートリアル
使用する@capgo/capacitor-firebase-authentication
CapacitorプラグインのFirebase Authentication。
インストール
bun add @capgo/capacitor-firebase-authentication
bunx cap sync
このプラグインが公開するもの
applyActionCode- メールで送信された確認codeを適用します。confirmPasswordReset- パスワードのリセットプロセスを完了します。confirmVerificationCode- 電話番号の確認プロセスを完了します。createUserWithEmailAndPassword- メールアドレスとパスワードで新しいユーザーアカウントを作成します。新しいアカウントが作成された場合、ユーザーは自動的にログインされます。
例の使用
applyActionCode
メールで送信された確認codeを適用します。
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);
フルリファレンス
- GitHub: https://github.com/Cap-go/capacitor-firebase/tree/main/packages/authentication
- ドキュメント: /docs/plugins/firebase-authentication/
使用中の@capgo/capacitor-firebase-authenticationから続けてください。
Capgoを使用している場合 @capgo/capacitor-firebase-authenticationを使用して 認証とアカウントフローの計画を行っている場合、Capgoの @capgo/capacitor-social-login 実装詳細については @capgo/capacitor-social-login を参照してください。 @capgo/capacitor-passkey 実装詳細については @capgo/capacitor-passkey を参照してください。 @capgo/capacitor-native-biometric 実装詳細については @capgo/capacitor-native-biometric を参照してください。 2要素認証 2要素認証の実装詳細については、 SSO (企業) SSO (企業)の実装詳細については、