Pull request #17: RED-4828: Logout after session timeout redirects to login page.

Merge in SL/common-ui from RED-4828 to master

* commit 'c3aebd94338b8a4cabd5bc209ba61aeff77b613d':
  RED-4828: Logout after session timeout redirects to login page.
This commit is contained in:
Nicoleta Panaghiu 2022-08-02 18:53:17 +02:00 committed by Timo Bejan
commit 7d55373093

View File

@ -18,10 +18,13 @@ export class IqserAuthGuard extends KeycloakAuthGuard {
async isAccessAllowed(route: ActivatedRouteSnapshot): Promise<boolean> {
if (!this.authenticated) {
const kcIdpHint = route.queryParamMap.get('kc_idp_hint');
await this._keycloak.login({
idpHint: kcIdpHint ?? this._configService.values.OAUTH_IDP_HINT,
const options: any = {
redirectUri: window.location.href,
});
};
if (kcIdpHint ?? this._configService.values.OAUTH_IDP_HINT) {
options.idpHint = kcIdpHint ?? this._configService.values.OAUTH_IDP_HINT;
}
await this._keycloak.login(options);
return false;
}