Skip to content

Commit

Permalink
Merge pull request FirebaseExtended#433 from firebase/jw-logout-bug
Browse files Browse the repository at this point in the history
Fixed bug from calling $logout() multiple times
  • Loading branch information
katowulf committed Oct 10, 2014
2 parents 9eeaa5c + 766495b commit 006135f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/firebaseSimpleLogin.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,10 @@
// Tell the simple login client to log us out.
this._authClient.logout();

// Forget who we were, so that any getCurrentUser calls will wait for
// another user event.
delete this._currentUserData;
// Forget who we were immediately, so that any getCurrentUser() calls
// will resolve the user as logged out even before the _onLoginEvent()
// fires and resets this._currentUserData to null again.
this._currentUserData = null;
},

// Creates a user for Firebase Simple Login. Function 'cb' receives an
Expand Down Expand Up @@ -231,4 +232,4 @@
}
}
};
})();
})();

0 comments on commit 006135f

Please sign in to comment.