2
0
mirror of synced 2025-01-29 23:55:10 +00:00
react-native-firebase/lib/modules/auth/ConfirmationResult.js
Benjamin Schell 2a509fe9c2 Update ConfirmationResult.js
Fix bug in ConfirmationResult.js: [ReferenceError: Can't find variable: _verificationId]
2017-10-12 14:46:10 -04:00

33 lines
730 B
JavaScript

/**
* @url https://firebase.google.com/docs/reference/js/firebase.User
*/
export default class ConfirmationResult {
_auth: Object;
_verificationId: string;
/**
*
* @param auth
* @param verificationId The phone number authentication operation's verification ID.
*/
constructor(auth: Object, verificationId: string) {
this._auth = auth;
this._verificationId = verificationId;
}
/**
*
* @param verificationCode
* @return {*}
*/
confirm(verificationCode: string): Promise<Object> {
return this._auth._interceptUserValue(
this._auth._native._confirmVerificationCode(verificationCode)
);
}
get verificationId(): String | null {
return this._verificationId;
}
}