Skip to content

Commit 6259c4d

Browse files
committed
onAuthChanged now only returns the user - or null if no authenticated user
1 parent af5b8f5 commit 6259c4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/modules/auth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default class Auth extends Base {
4747
*/
4848
_onAuthStateChanged(auth) {
4949
this._authResult = auth;
50-
this.emit('onAuthStateChanged', this._authResult);
50+
this.emit('onAuthStateChanged', this._authResult.user || null);
5151
this.authenticated = auth ? auth.authenticated || false : false;
5252
if (auth && auth.user && !this._user) this._user = new User(this, auth);
5353
else if ((!auth || !auth.user) && this._user) this._user = null;

0 commit comments

Comments
 (0)