Fix sign in redirect

This commit is contained in:
Joey Yakimowich-Payne 2026-01-16 10:39:58 -07:00
commit c550534d6c
No known key found for this signature in database
GPG key ID: 6BFE655FA5ABD1E1
4 changed files with 20 additions and 4 deletions

View file

@ -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);