SUPPORT-8788:fix auth-guard

This commit is contained in:
adel.kalimullin 2024-12-13 12:51:54 +03:00 committed by Zaripov Emil
parent 933004f686
commit 97201cd24b

View file

@ -63,10 +63,15 @@ export abstract class AuthGuard implements CanActivate {
return false;
}
else {
this.httpClient.get<string>("esia/url")
return this.httpClient.get<string>("esia/url")
.toPromise()
.then(url => window.open(url, "_self"));
return true;
.then(url => {
window.open(url, "_self");
return true;
}).catch((reason)=>{
console.error(reason);
return false;
});
}
}).catch((reason) => {
console.error(reason);