From 10b4681e3c6de348388891f5c7f461457ae2f630 Mon Sep 17 00:00:00 2001 From: Stephen Halter Date: Thu, 14 Aug 2025 10:47:15 -0700 Subject: [PATCH] Also fix authorizationUrl type --- client/src/components/OAuthDebugCallback.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/components/OAuthDebugCallback.tsx b/client/src/components/OAuthDebugCallback.tsx index e7a566f9..67ddc926 100644 --- a/client/src/components/OAuthDebugCallback.tsx +++ b/client/src/components/OAuthDebugCallback.tsx @@ -46,9 +46,12 @@ const OAuthDebugCallback = ({ onConnect }: OAuthCallbackProps) => { if (storedState) { try { restoredState = JSON.parse(storedState); - if (typeof restoredState.resource === "string") { + if (restoredState && typeof restoredState.resource === "string") { restoredState.resource = new URL(restoredState.resource); } + if (restoredState && typeof restoredState.authorizationUrl === "string") { + restoredState.authorizationUrl = new URL(restoredState.authorizationUrl); + } // Clean up the stored state sessionStorage.removeItem(SESSION_KEYS.AUTH_DEBUGGER_STATE); } catch (e) {