We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0659cfb commit 0590201Copy full SHA for 0590201
src/lib/utilities/route-for.ts
@@ -1,5 +1,5 @@
1
import { BROWSER } from 'esm-env';
2
-import { InvalidTokenError, jwtDecode, JwtPayload } from 'jwt-decode';
+import { InvalidTokenError, jwtDecode, type JwtPayload } from 'jwt-decode';
3
4
import { base } from '$app/paths';
5
@@ -301,7 +301,9 @@ export const routeForOIDCImplicitCallback = (): string => {
301
}
302
303
const state = hash.get('state');
304
- const redirectUrl = new URL(sessionStorage.getItem(state) ?? '/');
+ const redirectUrl = new URL(
305
+ (state ? sessionStorage.getItem(state) : null) ?? '/',
306
+ );
307
sessionStorage.removeItem('state');
308
309
setAuthUser(
0 commit comments