[ACA-4322] Logout - Avoid the redirect in case SSO auth (#6780)

* Avoid the redirect in case of sso

* Move the code into the if
This commit is contained in:
Maurizio Vitale
2021-03-05 09:46:21 +00:00
committed by GitHub
parent a5eb5acf5d
commit c152df30ab
2 changed files with 5 additions and 10 deletions

View File

@@ -52,11 +52,7 @@ export class LogoutDirective implements OnInit {
getRedirectUri () {
if (this.redirectUri === undefined ) {
if (this.auth.isOauth()) {
return this.appConfig.get<string>('oauth2.redirectUriLogout');
} else {
return this.appConfig.get<string>('loginRoute', '/login');
}
return this.appConfig.get<string>('loginRoute', '/login');
}
return this.redirectUri;
}
@@ -69,8 +65,8 @@ export class LogoutDirective implements OnInit {
}
redirectToUri() {
const redirectRoute = this.getRedirectUri();
if (this.enableRedirect) {
if (this.enableRedirect && !this.auth.isOauth()) {
const redirectRoute = this.getRedirectUri();
this.router.navigate([redirectRoute]);
}
}