diff --git a/lib/modules/auth/index.js b/lib/modules/auth/index.js index e81e1c6c..0279cc67 100644 --- a/lib/modules/auth/index.js +++ b/lib/modules/auth/index.js @@ -25,12 +25,14 @@ export default class Auth extends ModuleBase { this._user = null; this._authResult = null; this.authenticated = false; + this.addListener( // sub to internal native event - this fans out to // public event name: onAuthStateChanged this._getAppEventName('auth_state_changed'), this._onAuthStateChanged.bind(this), ); + this.addListener( // sub to internal native event - this fans out to // public event name: onIdTokenChanged @@ -218,7 +220,7 @@ export default class Auth extends ModuleBase { * @return {Promise.} */ confirmPasswordReset(code: string, newPassword: string): Promise { - return FirebaseAuth.confirmPasswordReset(code, newPassword); + return this._native.confirmPasswordReset(code, newPassword); } /** @@ -229,7 +231,7 @@ export default class Auth extends ModuleBase { * @return {Promise.} */ applyActionCode(code: string): Promise { - return FirebaseAuth.applyActionCode(code); + return this._native.applyActionCode(code); } /** @@ -240,7 +242,7 @@ export default class Auth extends ModuleBase { * @return {Promise.|Promise} */ checkActionCode(code: string): Promise { - return FirebaseAuth.checkActionCode(code); + return this._native.checkActionCode(code); } /** @@ -303,4 +305,10 @@ export const statics = { GithubAuthProvider, TwitterAuthProvider, FacebookAuthProvider, + VerifyPhoneState: { + CODE_SENT: 'sent', + AUTO_VERIFY_TIMEOUT: 'timeout', + SUCCESS: 'success', + ERROR: 'error', + }, };