From: Bill Erickson Date: Wed, 22 Feb 2023 18:55:06 +0000 (-0500) Subject: LP2006513 Angular login redirect repair X-Git-Url: http://git.equinoxoli.org/?p=evergreen-equinox.git;a=commitdiff_plain;h=922a71d07d270c6c29c506d40eed6c276ba43dd9 LP2006513 Angular login redirect repair The routeTo parameter must contain an eg2-based path (/staff/splash) and not a full path (/eg2/staff/splash) or URL. Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg --- diff --git a/Open-ILS/src/eg2/src/app/staff/resolver.service.ts b/Open-ILS/src/eg2/src/app/staff/resolver.service.ts index 225b931..69825a6 100644 --- a/Open-ILS/src/eg2/src/app/staff/resolver.service.ts +++ b/Open-ILS/src/eg2/src/app/staff/resolver.service.ts @@ -121,8 +121,8 @@ export class StaffResolver implements Resolve> { // valid auth token. Send the caller back to the login page. handleInvalidToken(state: RouterStateSnapshot): void { console.debug('StaffResolver: authtoken is not valid'); - const url = this.ngLocation.prepareExternalUrl(state.url); - this.router.navigate([LOGIN_PATH], {queryParams: {routeTo: url}}); + // state.url is the eg2 path, not a full URL. + this.router.navigate([LOGIN_PATH], {queryParams: {routeTo: state.url}}); this.observer.error('invalid or no auth token'); }