ConfirmationResult interface
Stay organized with collections
Save and categorize content based on your preferences.
A result from a phone number sign-in, link, or reauthenticate call.
Signature:
export interface ConfirmationResult
Properties
Property |
Type |
Description |
verificationId |
string |
The phone number authentication operation's verification ID. |
Methods
ConfirmationResult.verificationId
The phone number authentication operation's verification ID.
This can be used along with the verification code to initialize a PhoneAuthCredential.
Signature:
readonly verificationId: string;
ConfirmationResult.confirm()
Finishes a phone number sign-in, link, or reauthentication.
Signature:
confirm(verificationCode: string): Promise<UserCredential>;
Parameters
Parameter |
Type |
Description |
verificationCode |
string |
The code that was sent to the user's mobile device. |
Returns:
Promise<UserCredential>
Example
const confirmationResult = await signInWithPhoneNumber(auth, phoneNumber, applicationVerifier);
// Obtain verificationCode from the user.
const userCredential = await confirmationResult.confirm(verificationCode);
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-01-19 UTC.
[null,null,["Last updated 2024-01-19 UTC."],[],[],null,["A result from a phone number sign-in, link, or reauthenticate call.\n\n**Signature:** \n\n export interface ConfirmationResult \n\nProperties\n\nMethods\n\nConfirmationResult.verificationId\n\nThe phone number authentication operation's verification ID.\n\nThis can be used along with the verification code to initialize a [PhoneAuthCredential](./auth.phoneauthcredential.md#phoneauthcredential_class).\n\n**Signature:** \n\n readonly verificationId: string;\n\nConfirmationResult.confirm()\n\nFinishes a phone number sign-in, link, or reauthentication.\n\n**Signature:** \n\n confirm(verificationCode: string): Promise\u003cUserCredential\u003e;\n\nParameters\n\n**Returns:**\n\nPromise\\\u003c[UserCredential](./auth.usercredential.md#usercredential_interface)\\\u003e\n\nExample \n\n const confirmationResult = await signInWithPhoneNumber(auth, phoneNumber, applicationVerifier);\n // Obtain verificationCode from the user.\n const userCredential = await confirmationResult.confirm(verificationCode);"]]