Skip to content

Commit acc0530

Browse files
authored
Merge branch 'main' into fix-704-trim-command-whitespace
2 parents 0e30df8 + ade237e commit acc0530

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

client/src/components/OAuthDebugCallback.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,17 @@ const OAuthDebugCallback = ({ onConnect }: OAuthCallbackProps) => {
4646
if (storedState) {
4747
try {
4848
restoredState = JSON.parse(storedState);
49+
if (restoredState && typeof restoredState.resource === "string") {
50+
restoredState.resource = new URL(restoredState.resource);
51+
}
52+
if (
53+
restoredState &&
54+
typeof restoredState.authorizationUrl === "string"
55+
) {
56+
restoredState.authorizationUrl = new URL(
57+
restoredState.authorizationUrl,
58+
);
59+
}
4960
// Clean up the stored state
5061
sessionStorage.removeItem(SESSION_KEYS.AUTH_DEBUGGER_STATE);
5162
} catch (e) {

0 commit comments

Comments
 (0)