Skip to content

Commit

Permalink
[auth] Fix possible race condition #980
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbianca committed Apr 26, 2018
1 parent 9914dd1 commit 7cc7d5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/modules/auth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,16 @@ export default class Auth extends ModuleBase {
}

_setUser(user: ?NativeUser): ?User {
this._authResult = true;
this._user = user ? new User(this, user) : null;
this._authResult = true;
SharedEventEmitter.emit(getAppEventName(this, 'onUserChanged'), this._user);
return this._user;
}

_setUserCredential(userCredential: NativeUserCredential): UserCredential {
const user = new User(this, userCredential.user);
this._authResult = true;
this._user = user;
this._authResult = true;
SharedEventEmitter.emit(getAppEventName(this, 'onUserChanged'), this._user);
return {
additionalUserInfo: userCredential.additionalUserInfo,
Expand Down

0 comments on commit 7cc7d5a

Please sign in to comment.