fixed invalid references to native module 'FirebaseAuth' and added phone auth statics
This commit is contained in:
parent
75dfae369a
commit
c2ce379b2c
|
@ -25,12 +25,14 @@ export default class Auth extends ModuleBase {
|
||||||
this._user = null;
|
this._user = null;
|
||||||
this._authResult = null;
|
this._authResult = null;
|
||||||
this.authenticated = false;
|
this.authenticated = false;
|
||||||
|
|
||||||
this.addListener(
|
this.addListener(
|
||||||
// sub to internal native event - this fans out to
|
// sub to internal native event - this fans out to
|
||||||
// public event name: onAuthStateChanged
|
// public event name: onAuthStateChanged
|
||||||
this._getAppEventName('auth_state_changed'),
|
this._getAppEventName('auth_state_changed'),
|
||||||
this._onAuthStateChanged.bind(this),
|
this._onAuthStateChanged.bind(this),
|
||||||
);
|
);
|
||||||
|
|
||||||
this.addListener(
|
this.addListener(
|
||||||
// sub to internal native event - this fans out to
|
// sub to internal native event - this fans out to
|
||||||
// public event name: onIdTokenChanged
|
// public event name: onIdTokenChanged
|
||||||
|
@ -218,7 +220,7 @@ export default class Auth extends ModuleBase {
|
||||||
* @return {Promise.<Null>}
|
* @return {Promise.<Null>}
|
||||||
*/
|
*/
|
||||||
confirmPasswordReset(code: string, newPassword: string): Promise<Null> {
|
confirmPasswordReset(code: string, newPassword: string): Promise<Null> {
|
||||||
return FirebaseAuth.confirmPasswordReset(code, newPassword);
|
return this._native.confirmPasswordReset(code, newPassword);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -229,7 +231,7 @@ export default class Auth extends ModuleBase {
|
||||||
* @return {Promise.<Null>}
|
* @return {Promise.<Null>}
|
||||||
*/
|
*/
|
||||||
applyActionCode(code: string): Promise<Any> {
|
applyActionCode(code: string): Promise<Any> {
|
||||||
return FirebaseAuth.applyActionCode(code);
|
return this._native.applyActionCode(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -240,7 +242,7 @@ export default class Auth extends ModuleBase {
|
||||||
* @return {Promise.<Any>|Promise<ActionCodeInfo>}
|
* @return {Promise.<Any>|Promise<ActionCodeInfo>}
|
||||||
*/
|
*/
|
||||||
checkActionCode(code: string): Promise<Any> {
|
checkActionCode(code: string): Promise<Any> {
|
||||||
return FirebaseAuth.checkActionCode(code);
|
return this._native.checkActionCode(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -303,4 +305,10 @@ export const statics = {
|
||||||
GithubAuthProvider,
|
GithubAuthProvider,
|
||||||
TwitterAuthProvider,
|
TwitterAuthProvider,
|
||||||
FacebookAuthProvider,
|
FacebookAuthProvider,
|
||||||
|
VerifyPhoneState: {
|
||||||
|
CODE_SENT: 'sent',
|
||||||
|
AUTO_VERIFY_TIMEOUT: 'timeout',
|
||||||
|
SUCCESS: 'success',
|
||||||
|
ERROR: 'error',
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue