Skip to content

Prevent rendering in an iframe#298

Merged
dkhalife merged 1 commit intomainfrom
fix_nesting_issue
Apr 8, 2026
Merged

Prevent rendering in an iframe#298
dkhalife merged 1 commit intomainfrom
fix_nesting_issue

Conversation

@dkhalife
Copy link
Copy Markdown
Owner

@dkhalife dkhalife commented Apr 8, 2026

MSAL's silent login uses iframe that redirect to / which renders the app within them, over and over again

Copilot AI review requested due to automatic review settings April 8, 2026 02:52
@dkhalife dkhalife merged commit 0db19e6 into main Apr 8, 2026
8 checks passed
@dkhalife dkhalife deleted the fix_nesting_issue branch April 8, 2026 02:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Prevents the React SPA from rendering when loaded inside an iframe, addressing an MSAL silent-login loop where redirecting to / causes the app to repeatedly render within hidden iframes.

Changes:

  • Guard SPA mounting so ReactDOM.createRoot(...).render(...) only runs when the page is the top-level window.
Show a summary per file
File Description
frontend/src/main.tsx Adds a top-level-window guard to avoid rendering the app inside MSAL’s hidden iframe redirect flow.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants