File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -24,27 +24,17 @@ export default class Auth extends Base {
2424 // start listening straight away
2525 // generally though the initial event fired will get ignored
2626 // but this is ok as we fake it with the getCurrentUser below
27+ FirestackAuthEvt . addListener ( 'listenForAuth' , this . _onAuthStateChanged . bind ( this ) ) ;
2728 FirestackAuth . listenForAuth ( ) ;
2829
2930 this . getCurrentUser ( ) . then ( ( u : Object ) => {
3031 this . _onAuthStateChanged ( { authenticated : ! ! u , user : u || null } ) ;
31- this . _startListening ( ) ;
3232 } ) . catch ( ( ) => {
3333 // todo check if error contains user disabled message maybe and add a disabled flag?
3434 this . _onAuthStateChanged ( { authenticated : false , user : null } ) ;
35- this . _startListening ( ) ;
3635 } ) ;
3736 }
3837
39- /**
40- * Internal function begin listening for auth changes
41- * only called after getting current user.
42- * @private
43- */
44- _startListening ( ) {
45- FirestackAuthEvt . addListener ( 'listenForAuth' , this . _onAuthStateChanged . bind ( this ) ) ;
46- }
47-
4838 /**
4939 * Internal auth changed listener
5040 * @param auth
You can’t perform that action at this time.
0 commit comments