Skip to content

Commit 4cb24bd

Browse files
committed
offAuthStateChanged is now internal only - onAuthStateChanged now returns the unsubribe fn - as per web api
1 parent 7e03cff commit 4cb24bd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/modules/auth.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,14 @@ export default class Auth extends Base {
6161
this.log.info('Creating onAuthStateChanged listener');
6262
this.on('onAuthStateChanged', listener);
6363
if (this._authResult) listener(this._authResult.user || null);
64+
return this._offAuthStateChanged.bind(this, listener);
6465
}
6566

6667
/**
6768
* Remove auth change listener
6869
* @param listener
6970
*/
70-
offAuthStateChanged(listener: Function) {
71+
_offAuthStateChanged(listener: Function) {
7172
this.log.info('Removing onAuthStateChanged listener');
7273
this.removeListener('onAuthStateChanged', listener);
7374
}

0 commit comments

Comments
 (0)