mirror of
https://github.com/hanzoai/firebase-js-sdk.git
synced 2026-09-24 16:59:10 +00:00
* Support function links to function overloads. * Improve readability of headings for functions.
1.9 KiB
1.9 KiB
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 %}
ConfirmationResult interface
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
| Method | Description |
|---|---|
| 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 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);