This commit is contained in:
Eduard Tihomirov 2025-05-13 16:57:32 +03:00
parent 2bf9407b32
commit fefb2344cf

View file

@ -61,7 +61,6 @@ export abstract class AuthGuard implements CanActivate {
return false; return false;
} }
if (code && state) { if (code && state) {
this.progressIndicationService.showProgressBar();
const params = new HttpParams().set('code', code).set('state', state); const params = new HttpParams().set('code', code).set('state', state);
this.httpClient.get("esia/auth", this.httpClient.get("esia/auth",
{ {
@ -75,7 +74,6 @@ export abstract class AuthGuard implements CanActivate {
.toPromise() .toPromise()
.then( .then(
() => { () => {
this.progressIndicationService.hideProgressBar();
window.open(url.origin + url.pathname, "_self"); window.open(url.origin + url.pathname, "_self");
}) })
.catch(reason => { .catch(reason => {
@ -83,8 +81,7 @@ export abstract class AuthGuard implements CanActivate {
json.messages.forEach((errorMessage) => { json.messages.forEach((errorMessage) => {
this.messageService.error(errorMessage, json); this.messageService.error(errorMessage, json);
}) })
}) });
.finally(() => this.progressIndicationService.hideProgressBar());
return false; return false;
} }
else { else {