A konzolhoz

The Firebase Auth service interface.

Do not call this constructor directly. Instead, use firebase.auth().

See Firebase Authentication for a full guide on how to use the Firebase Auth service.

Index

Type aliases

Persistence

Persistence: string

An enumeration of the possible persistence mechanism types.

Properties

app

app: App

The app associated with the Auth service instance.

example
var app = auth.app;

currentUser

currentUser: User | null

The currently signed-in user (or null).

languageCode

languageCode: string | null

The current Auth instance's language code. This is a readable/writable property. When set to null, the default Firebase Console language setting is applied. The language code will propagate to email action templates (password reset, email verification and email change revocation), SMS templates for phone authentication, reCAPTCHA verifier and OAuth popup/redirect operations provided the specified providers support localization with the language code specified.

settings

settings: AuthSettings

The current Auth instance's settings. This is used to edit/read configuration related options like app verification mode for phone authentication.

Methods

applyActionCode

  • applyActionCode(code: string): Promise<void>
  • Applies a verification code sent to the user by email or other out-of-band mechanism.

    Error Codes

    auth/expired-action-code
    Thrown if the action code has expired.
    auth/invalid-action-code
    Thrown if the action code is invalid. This can happen if the code is malformed or has already been used.
    auth/user-disabled
    Thrown if the user corresponding to the given action code has been disabled.
    auth/user-not-found
    Thrown if there is no user corresponding to the action code. This may have happened if the user was deleted between when the action code was issued and when this method was called.

    Parameters

    • code: string

      A verification code sent to the user.

    Returns Promise<void>

checkActionCode

  • checkActionCode(code: string): Promise<ActionCodeInfo>
  • Checks a verification code sent to the user by email or other out-of-band mechanism.

    Returns metadata about the code.

    Error Codes

    auth/expired-action-code
    Thrown if the action code has expired.
    auth/invalid-action-code
    Thrown if the action code is invalid. This can happen if the code is malformed or has already been used.
    auth/user-disabled
    Thrown if the user corresponding to the given action code has been disabled.
    auth/user-not-found
    Thrown if there is no user corresponding to the action code. This may have happened if the user was deleted between when the action code was issued and when this method was called.

    Parameters

    • code: string

      A verification code sent to the user.

    Returns Promise<ActionCodeInfo>

confirmPasswordReset

  • confirmPasswordReset(code: string, newPassword: string