@infrab4a/connect-angular 4.3.6 → 4.3.7-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,7 @@ import { Firestore, provideFirestore, getFirestore, initializeFirestore, memoryL
12
12
  import * as i2 from '@angular/fire/storage';
13
13
  import { Storage, provideStorage, getStorage } from '@angular/fire/storage';
14
14
  import { combineLatest, from, of, throwError, Subject, iif, forkJoin } from 'rxjs';
15
- import { map, mergeMap, catchError, concatMap, tap } from 'rxjs/operators';
15
+ import { map, tap, mergeMap, catchError, concatMap } from 'rxjs/operators';
16
16
  import cookie from 'js-cookie';
17
17
  import { __decorate, __metadata } from 'tslib';
18
18
  import { Type } from 'class-transformer';
@@ -940,13 +940,16 @@ class AuthService {
940
940
  })));
941
941
  }
942
942
  getUser() {
943
- return this.getFireUser().pipe(map((user) => user?.uid), mergeMap((id) => (id ? from(this.userRepository.get({ id })).pipe(catchError(() => of(null))) : of(null))));
943
+ return this.getFireUser().pipe(tap((user) => console.log('connect - getUser', user?.uid)), map((user) => user?.uid), mergeMap((id) => (id ? from(this.userRepository.get({ id })).pipe(catchError(() => of(null))) : of(null))));
944
944
  }
945
945
  getTokenId() {
946
946
  return from(getIdToken(this.angularFireAuth.currentUser));
947
947
  }
948
948
  getFireUser() {
949
- return authState(this.angularFireAuth).pipe(catchError(() => of(null)));
949
+ return authState(this.angularFireAuth).pipe(tap((user) => console.log('connect - getFireUser', user?.uid)), catchError((error) => {
950
+ console.log(error);
951
+ return of(null);
952
+ }));
950
953
  }
951
954
  }
952
955
  AuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AuthService, deps: [{ token: i1.Auth }, { token: 'UserRepository' }], target: i0.ɵɵFactoryTarget.Injectable });