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 {
24
24
// start listening straight away
25
25
// generally though the initial event fired will get ignored
26
26
// but this is ok as we fake it with the getCurrentUser below
27
+ FirestackAuthEvt . addListener ( 'listenForAuth' , this . _onAuthStateChanged . bind ( this ) ) ;
27
28
FirestackAuth . listenForAuth ( ) ;
28
29
29
30
this . getCurrentUser ( ) . then ( ( u : Object ) => {
30
31
this . _onAuthStateChanged ( { authenticated : ! ! u , user : u || null } ) ;
31
- this . _startListening ( ) ;
32
32
} ) . catch ( ( ) => {
33
33
// todo check if error contains user disabled message maybe and add a disabled flag?
34
34
this . _onAuthStateChanged ( { authenticated : false , user : null } ) ;
35
- this . _startListening ( ) ;
36
35
} ) ;
37
36
}
38
37
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
-
48
38
/**
49
39
* Internal auth changed listener
50
40
* @param auth
You can’t perform that action at this time.
0 commit comments