Also fix authorizationUrl type
This commit is contained in:
parent
fc4aeb392f
commit
10b4681e3c
1 changed files with 4 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue