Fix sign in redirect
This commit is contained in:
parent
c98e262fd0
commit
c550534d6c
4 changed files with 20 additions and 4 deletions
|
|
@ -34,7 +34,14 @@ if (!rootElement) {
|
|||
const shouldSkipSigninCallback = !window.location.pathname.startsWith('/callback');
|
||||
|
||||
const onSigninCallback = () => {
|
||||
window.history.replaceState({}, document.title, '/');
|
||||
const returnUrl = sessionStorage.getItem('kaboot_auth_return_url');
|
||||
sessionStorage.removeItem('kaboot_auth_return_url');
|
||||
|
||||
if (returnUrl && returnUrl !== '/') {
|
||||
window.location.replace(returnUrl);
|
||||
} else {
|
||||
window.history.replaceState({}, document.title, '/');
|
||||
}
|
||||
};
|
||||
|
||||
const root = ReactDOM.createRoot(rootElement);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue