2
0
mirror of synced 2025-01-26 06:09:32 +00:00
react-native-firebase/lib/modules/auth/ConfirmationResult.js
Salakar 0675aa076d Merge branch 'master' of https://github.com/invertase/react-native-firebase into v3
# Conflicts:
#	ios/RNFirebase/admob/RNFirebaseAdMob.m
#	ios/RNFirebase/database/RNFirebaseDatabase.h
#	ios/RNFirebase/database/RNFirebaseDatabaseReference.m
#	lib/modules/admob/index.js
#	tests/ios/Podfile.lock
2017-08-12 19:07:51 +01:00

26 lines
693 B
JavaScript

/**
* @url https://firebase.google.com/docs/reference/js/firebase.User
*/
export default class ConfirmationResult {
_auth: Object;
_verificationId: string;
/**
*
* @param verificationId The phone number authentication operation's verification ID.
*/
constructor(auth: Object, verificationId: string) {
this._auth = auth;
this._verificationId = verificationId;
}
confirm(verificationCode: string): Promise<Object> {
// verificationId is stored server side in case the app is shut when opening the SMS app
return this._auth._native.confirmVerificationCode(verificationCode);
}
get verificationId(): String | null {
return _verificationId;
}
}