Commit d1ca706b489232931431f021bcff12e385b7b9bc

Authored by Igor Kulikov
1 parent b07732a6

Fix Auth guard

@@ -84,15 +84,15 @@ export class AuthGuard implements CanActivate, CanActivateChild { @@ -84,15 +84,15 @@ export class AuthGuard implements CanActivate, CanActivateChild {
84 // this.authService.gotoDefaultPlace(false); 84 // this.authService.gotoDefaultPlace(false);
85 return of(this.authService.defaultUrl(false)); 85 return of(this.authService.defaultUrl(false));
86 } else { 86 } else {
87 - const tasks: Observable<any>[] = [];  
88 if (path === 'login') { 87 if (path === 'login') {
89 - tasks.push(this.authService.loadOAuth2Clients()); 88 + return forkJoin([this.authService.loadOAuth2Clients()]).pipe(
  89 + map(() => {
  90 + return true;
  91 + })
  92 + );
  93 + } else {
  94 + return of(true);
90 } 95 }
91 - return forkJoin(tasks).pipe(  
92 - map(() => {  
93 - return true;  
94 - })  
95 - );  
96 } 96 }
97 } else { 97 } else {
98 if (authState.authUser.isPublic) { 98 if (authState.authUser.isPublic) {