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(
map((x) => this.currentAuthenticationToken(x)),
concatMap(response => {
return this.accessToken ? this.ensureTenant(tenantCode ?? this.selectedTenant() ?? 'default') : of(false);
return this.ensureTenant(tenantCode ?? this.selectedTenant() ?? 'default');
}),
concatMap(response => {
return this.accessToken ? this.principalService.me(httpParams) : of(null);
return this.principalService.me(httpParams);
}),
concatMap(response => {
this.currentAccount(response);
return this.accessToken ? this.tenantHandlingService.loadTenantCssColors() : of(null);
return this.tenantHandlingService.loadTenantCssColors();
}),
map((item) => {
this.tenantHandlingService.applyTenantCssColors(item[2]?.cssColors);
return true;
concatMap(response => {
this.tenantHandlingService.applyTenantCssColors(response?.cssColors);
return of(true);
})
);
}