Create a one-time subscription to capture authState : Is it possible to create a subscription that attempts to get the user's auth state repeatedly until `user != null`:

      ngOnInit() {
        this.isMobile = this.breakpointObserver.observe([Breakpoints.Handset]);
        this.authSubscription = this.afAuth.authState.subscribe(user => {
          if(user) {
            localStorage.setItem('uid', user.uid);
            this.store.dispatch(userActions.getData());
          }
        })
      }

The console output is as follows which causes the browser to crash:

[![enter image description here][1]][1]

My action is as follows:

      @Effect()
      getData$ = this.actions$.pipe(
        ofType(UserActions.getData),
        switchMap(() => {
            return this.userService.getUserById(localStorage.getItem('uid')).pipe(
              map(
                (data: IUser) => UserActions.dataReceived({ payload: UserService.parseData(data) })
              )
            );
          }
        )
      );

  [1]: https://i.stack.imgur.com/avKlw.png