Skip to content

Commit fc4aeb3

Browse files
committed
Restore AuthDebuggerState.resource as URL
Not doing so prevents the resource URI from getting sent to the OAuth server's token endpoint during the "Quick OAuth flow"
1 parent 16edf53 commit fc4aeb3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

client/src/components/OAuthDebugCallback.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ const OAuthDebugCallback = ({ onConnect }: OAuthCallbackProps) => {
4646
if (storedState) {
4747
try {
4848
restoredState = JSON.parse(storedState);
49+
if (typeof restoredState.resource === "string") {
50+
restoredState.resource = new URL(restoredState.resource);
51+
}
4952
// Clean up the stored state
5053
sessionStorage.removeItem(SESSION_KEYS.AUTH_DEBUGGER_STATE);
5154
} catch (e) {

0 commit comments

Comments
 (0)