Skip to main content

Using @capgo/capacitor-firebase-authentication

Capacitor plugin for Firebase Authentication.

Install

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

What This Plugin Exposes

  • applyActionCode - Applies a verification code sent to the user by email.
  • confirmPasswordReset - Completes the password reset process.
  • confirmVerificationCode - Finishes the phone number verification process.
  • createUserWithEmailAndPassword - Creates a new user account with email and password. If the new account was created, the user is signed in automatically.

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

Completes the password reset process.

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

await FirebaseAuthentication.confirmPasswordReset({} as ConfirmPasswordResetOptions);

confirmVerificationCode

Finishes the phone number verification process.

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

await FirebaseAuthentication.confirmVerificationCode({} as ConfirmVerificationCodeOptions);

createUserWithEmailAndPassword

Creates a new user account with email and password. If the new account was created, the user is signed in automatically.

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

await FirebaseAuthentication.createUserWithEmailAndPassword({} as CreateUserWithEmailAndPasswordOptions);

Full Reference