Skip to content

Commit 10b4681

Browse files
committed
Also fix authorizationUrl type
1 parent fc4aeb3 commit 10b4681

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

client/src/components/OAuthDebugCallback.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,12 @@ const OAuthDebugCallback = ({ onConnect }: OAuthCallbackProps) => {
4646
if (storedState) {
4747
try {
4848
restoredState = JSON.parse(storedState);
49-
if (typeof restoredState.resource === "string") {
49+
if (restoredState && typeof restoredState.resource === "string") {
5050
restoredState.resource = new URL(restoredState.resource);
5151
}
52+
if (restoredState && typeof restoredState.authorizationUrl === "string") {
53+
restoredState.authorizationUrl = new URL(restoredState.authorizationUrl);
54+
}
5255
// Clean up the stored state
5356
sessionStorage.removeItem(SESSION_KEYS.AUTH_DEBUGGER_STATE);
5457
} catch (e) {

0 commit comments

Comments
 (0)