diff --git a/plugins/auth/src/auth-oidc/index.js b/plugins/auth/src/auth-oidc/index.js index 7e0385dfb6..3c455674dd 100644 --- a/plugins/auth/src/auth-oidc/index.js +++ b/plugins/auth/src/auth-oidc/index.js @@ -184,12 +184,19 @@ export default class openIdConnect { // else persistence might fail. setTimeout(() => { if (authenticatedUser.state) { - window.location.href = decodeURIComponent( - authenticatedUser.state + history.pushState( + '', + document.title, + decodeURIComponent(authenticatedUser.state) ); } else { - window.location.href = window.location.origin; + history.pushState( + '', + document.title, + window.location.pathname + window.location.search + ); } + resolve(true); }, 50); }) .catch(err => {