diff --git a/frontend/src/app/guards/auth.guard.ts b/frontend/src/app/guards/auth.guard.ts index 22b0c59..6b86631 100644 --- a/frontend/src/app/guards/auth.guard.ts +++ b/frontend/src/app/guards/auth.guard.ts @@ -27,6 +27,9 @@ export class AuthGuard implements CanActivate { return this.authService.login(code).pipe( switchMap(() => { const result = this.canActivateInternal(route, state); + if (route.routeConfig?.path === 'login/:code') { + this.router.navigateByUrl('/', {replaceUrl: true}).then(); + } return isObservable(result) ? result : result instanceof Promise ? from(result) : of(result); }), catchError(() => of(this.router.createUrlTree(['/'])))