docs-devsite/auth.confirmationresult.md
Project: /docs/reference/js/_project.yaml Book: /docs/reference/_book.yaml page_type: reference
{% comment %} DO NOT EDIT THIS FILE! This is generated by the JS SDK team, and any local changes will be overwritten. Changes should be made in the source code at https://github.com/firebase/firebase-js-sdk {% endcomment %}
A result from a phone number sign-in, link, or reauthenticate call.
<b>Signature:</b>
export interface ConfirmationResult
| Property | Type | Description |
|---|---|---|
| verificationId | string | The phone number authentication operation's verification ID. |
| Method | Description |
|---|---|
| confirm(verificationCode) | Finishes a phone number sign-in, link, or reauthentication. |
The phone number authentication operation's verification ID.
This can be used along with the verification code to initialize a PhoneAuthCredential<!-- -->.
<b>Signature:</b>
readonly verificationId: string;
Finishes a phone number sign-in, link, or reauthentication.
<b>Signature:</b>
confirm(verificationCode: string): Promise<UserCredential>;
| Parameter | Type | Description |
|---|---|---|
| verificationCode | string | The code that was sent to the user's mobile device. |
<b>Returns:</b>
Promise<UserCredential<!-- -->>
const confirmationResult = await signInWithPhoneNumber(auth, phoneNumber, applicationVerifier);
// Obtain verificationCode from the user.
const userCredential = await confirmationResult.confirm(verificationCode);