電話號碼登入、連結或重新驗證通話的結果。
簽名:
export interface ConfirmationResult
特性
財產 | 類型 | 描述 |
---|---|---|
驗證ID | 細繩 | 電話號碼認證操作的驗證ID。 |
方法
方法 | 描述 |
---|---|
確認(驗證碼) | 完成電話號碼登入、連結或重新身份驗證。 |
確認結果.verificationId
電話號碼認證操作的驗證ID。
這可以與驗證碼一起使用來初始化PhoneAuthCredential 。
簽名:
readonly verificationId: string;
確認結果.confirm()
完成電話號碼登入、連結或重新身份驗證。
簽名:
confirm(verificationCode: string): Promise<UserCredential>;
參數
範圍 | 類型 | 描述 |
---|---|---|
驗證碼 | 細繩 | 發送到用戶行動裝置的代碼。 |
返回:
承諾<使用者憑證>
例子
const confirmationResult = await signInWithPhoneNumber(auth, phoneNumber, applicationVerifier);
// Obtain verificationCode from the user.
const userCredential = await confirmationResult.confirm(verificationCode);