login flow fix

This commit is contained in:
Diamantis Tziotzios 2024-06-28 16:24:32 +03:00
parent 07511bae75
commit 579b2cba06
1 changed files with 6 additions and 6 deletions

View File

@ -171,18 +171,18 @@ export class AuthService extends BaseService {
return observable.pipe( return observable.pipe(
map((x) => this.currentAuthenticationToken(x)), map((x) => this.currentAuthenticationToken(x)),
concatMap(response => { concatMap(response => {
return this.accessToken ? this.ensureTenant(tenantCode ?? this.selectedTenant() ?? 'default') : of(false); return this.ensureTenant(tenantCode ?? this.selectedTenant() ?? 'default');
}), }),
concatMap(response => { concatMap(response => {
return this.accessToken ? this.principalService.me(httpParams) : of(null); return this.principalService.me(httpParams);
}), }),
concatMap(response => { concatMap(response => {
this.currentAccount(response); this.currentAccount(response);
return this.accessToken ? this.tenantHandlingService.loadTenantCssColors() : of(null); return this.tenantHandlingService.loadTenantCssColors();
}), }),
map((item) => { concatMap(response => {
this.tenantHandlingService.applyTenantCssColors(item[2]?.cssColors); this.tenantHandlingService.applyTenantCssColors(response?.cssColors);
return true; return of(true);
}) })
); );
} }