diff --git a/src/frontend/service/auth.service.ts b/src/frontend/service/auth.service.ts index 336a1302ad600ea201057c497cec2e05d6bb75ec..cb2fa8e6de928b0eec6d4c13ff5282182448a2bc 100644 --- a/src/frontend/service/auth.service.ts +++ b/src/frontend/service/auth.service.ts @@ -106,8 +106,17 @@ export class AuthService { if (['cas', 'keycloak'].indexOf(this.authMode) > -1 && !forcePageLogin) { this.SsoLogout(cleanUrl); } else { - this.redirectAfterLogout(cleanUrl); - await this.router.navigate(['/login']); + // AVOID UNLOCK ON DESROY COMPONENT + if (['process', 'signatureBook'].indexOf(this.router.url.split('/')[1]) > -1) { + this.router.navigate(['/home']); + setTimeout(() => { + this.redirectAfterLogout(cleanUrl); + this.router.navigate(['/login']); + }, 500); + } else { + this.redirectAfterLogout(cleanUrl); + await this.router.navigate(['/login']); + } } }