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:
parent
16edf53794
commit
fc4aeb392f
1 changed files with 3 additions and 0 deletions
|
|
@ -46,6 +46,9 @@ const OAuthDebugCallback = ({ onConnect }: OAuthCallbackProps) => {
|
||||||
if (storedState) {
|
if (storedState) {
|
||||||
try {
|
try {
|
||||||
restoredState = JSON.parse(storedState);
|
restoredState = JSON.parse(storedState);
|
||||||
|
if (typeof restoredState.resource === "string") {
|
||||||
|
restoredState.resource = new URL(restoredState.resource);
|
||||||
|
}
|
||||||
// Clean up the stored state
|
// Clean up the stored state
|
||||||
sessionStorage.removeItem(SESSION_KEYS.AUTH_DEBUGGER_STATE);
|
sessionStorage.removeItem(SESSION_KEYS.AUTH_DEBUGGER_STATE);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue