Skip to content

Commit

Permalink
fix: catch iFrame error, so the silentRefresh is properly handled
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Riemens committed Dec 12, 2022
1 parent 3c6722a commit 9cb9334
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/utils/iframe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ export function loadIframeUrl(url: string): Promise<string> {
resolve(iFrame.contentWindow.location.href);
};

iFrame.onerror = () => {
reject('iframe error (possible reasons: COR / CSP / Frame Ancestors / other iFrame security issues');
}

timeout(20000).then(() => {
reject('iFrame rejected');
});
Expand Down

0 comments on commit 9cb9334

Please sign in to comment.