Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Commit 766495b

Browse files
author
jacobawenger
committed
Updated fix for $logout() bug
1 parent 2174847 commit 766495b

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/firebaseSimpleLogin.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,13 @@
9494

9595
// Unauthenticate the Firebase reference.
9696
logout: function() {
97-
if (this._currentUserData) {
98-
// Tell the simple login client to log us out.
99-
this._authClient.logout();
97+
// Tell the simple login client to log us out.
98+
this._authClient.logout();
10099

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

107106
// Creates a user for Firebase Simple Login. Function 'cb' receives an

0 commit comments

Comments
 (0)