ConfirmationResult interface

A result from a phone number sign-in, link, or reauthenticate call.

Signature:

exportinterfaceConfirmationResult

Properties

PropertyTypeDescription
verificationIdstringThe phone number authentication operation's verification ID.

Methods

MethodDescription
confirm(verificationCode)Finishes a phone number sign-in, link, or reauthentication.

ConfirmationResult.verificationId

The phone number authentication operation's verification ID.

This can be used along with the verification code to initialize aPhoneAuthCredential.

Signature:

readonlyverificationId:string;

ConfirmationResult.confirm()

Finishes a phone number sign-in, link, or reauthentication.

Signature:

confirm(verificationCode:string):Promise<UserCredential>;

Parameters

ParameterTypeDescription
verificationCodestringThe code that was sent to the user's mobile device.

Returns:

Promise<UserCredential>

Example

constconfirmationResult=awaitsignInWithPhoneNumber(auth,phoneNumber,applicationVerifier);// Obtain verificationCode from the user.constuserCredential=awaitconfirmationResult.confirm(verificationCode);

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-01-19 UTC.