react-native-firebase/lib/modules/auth/ConfirmationResult.js

33 lines
730 B
JavaScript
Raw Normal View History

2017-08-25 11:16:23 +00:00
/**
* @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;
2017-08-25 11:16:23 +00:00
}
}