diff --git a/src/app/core/auth/auth.service.ts b/src/app/core/auth/auth.service.ts index 229c44bcfa..5d8d13131a 100644 --- a/src/app/core/auth/auth.service.ts +++ b/src/app/core/auth/auth.service.ts @@ -357,14 +357,10 @@ export class AuthService { this.getRedirectUrl().pipe( first()) .subscribe((redirectUrl) => { + if (isNotEmpty(redirectUrl)) { this.clearRedirectUrl(); - - // override the route reuse strategy - this.router.routeReuseStrategy.shouldReuseRoute = () => { - return false; - }; - this.router.navigated = false; + this.router.onSameUrlNavigation = 'reload'; const url = decodeURIComponent(redirectUrl); this.router.navigateByUrl(url); /* TODO Reenable hard redirect when REST API can handle x-forwarded-for, see https://github.com/DSpace/DSpace/pull/2207 */