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"
This commit is contained in:
Stephen Halter 2025-08-13 14:00:08 -07:00
commit fc4aeb392f

View file

@ -46,6 +46,9 @@ const OAuthDebugCallback = ({ onConnect }: OAuthCallbackProps) => {
if (storedState) {
try {
restoredState = JSON.parse(storedState);
if (typeof restoredState.resource === "string") {
restoredState.resource = new URL(restoredState.resource);
}
// Clean up the stored state
sessionStorage.removeItem(SESSION_KEYS.AUTH_DEBUGGER_STATE);
} catch (e) {