SUPPORT-9164: Clear url

This commit is contained in:
Eduard Tihomirov 2025-05-15 10:10:36 +03:00
parent 081f1b1ab2
commit 4ebb22be01

View file

@ -24,7 +24,6 @@ export abstract class AuthGuard implements CanActivate {
public canActivate(route: ActivatedRouteSnapshot,
state: RouterStateSnapshot): Observable<boolean> | Promise<boolean> | boolean {
this.progressIndicationService.showProgressBar();
let url = new URL(window.location.href);
if (!AccessChecker.checkBrowser()) {
this.progressIndicationService.hideProgressBar();
@ -45,6 +44,9 @@ export abstract class AuthGuard implements CanActivate {
let state = params.get('state');
let error = params.get('error');
let errorDescription = params.get('error_description');
if (code || state || error || errorDescription) {
window.history.replaceState({}, document.title, url.pathname);
}
if (isAccess) {
return true;
}