firebase-admin.phone-number-verification package

Firebase Phone Number Verification.

Functions

Function Description
getPhoneNumberVerification(app) Gets the PhoneNumberVerification service for the default app or a given app.getPhoneNumberVerification() can be called with no arguments to access the default app's PhoneNumberVerification service or as getPhoneNumberVerification(app) to access the PhoneNumberVerification service associated with a specific app.

Classes

Class Description
FirebasePhoneNumberVerificationError Firebase Phone Number Verification error code structure. This extends FirebaseError.
PhoneNumberVerification PhoneNumberVerification service bound to the provided app.

Interfaces

Interface Description
PhoneNumberVerificationToken Interface representing a PhoneNumberVerification token.

Variables

Variable Description
PhoneNumberVerificationErrorCode The constant mapping for valid Phone Number Verification client error codes.

Type Aliases

Type Alias Description
PhoneNumberVerificationErrorCode The type definition for valid Phone Number Verification client error codes.

getPhoneNumberVerification(app)

Gets the PhoneNumberVerification service for the default app or a given app.

getPhoneNumberVerification() can be called with no arguments to access the default app's PhoneNumberVerification service or as getPhoneNumberVerification(app) to access the PhoneNumberVerification service associated with a specific app.

Signature:

export declare function getPhoneNumberVerification(app?: App): PhoneNumberVerification;

Parameters

Parameter Type Description
app App

Returns:

PhoneNumberVerification

The PhoneNumberVerification service associated with the provided app.

Example 1

// Get the PhoneNumberVerification service for the default app
const defaultPnv = getPhoneNumberVerification();

Example 2

// Get the PhoneNumberVerification service for a given app
const otherPnv = getPhoneNumberVerification(otherApp);

PhoneNumberVerificationErrorCode

The constant mapping for valid Phone Number Verification client error codes.

Signature:

PhoneNumberVerificationErrorCode: {
    readonly INVALID_ARGUMENT: "invalid-argument";
    readonly INVALID_TOKEN: "invalid-token";
    readonly EXPIRED_TOKEN: "expired-token";
}

PhoneNumberVerificationErrorCode

The type definition for valid Phone Number Verification client error codes.

Signature:

export type PhoneNumberVerificationErrorCode = typeof PhoneNumberVerificationErrorCode[keyof typeof PhoneNumberVerificationErrorCode];