Skip to content

Enhance OAuth Flow: Implement Pre-Opened Popup for Authentication - #2336

Merged
pedrofrxncx merged 1 commit into
mainfrom
fix/store-oauth
Jan 27, 2026
Merged

pedrofrxncx merged 1 commit into
mainfrom
fix/store-oauth

Conversation

@pedrofrxncx

@pedrofrxncx pedrofrxncx commented Jan 27, 2026 •

Copy link
Copy Markdown
Collaborator
  • Added openOAuthPopup function to facilitate synchronous popup opening in click handlers, reducing the likelihood of popup blockers, especially in Safari/iOS.
  • Updated authenticateMcp to accept a pre-opened popup window, allowing for smoother authentication experiences.
  • Modified SettingsTabContentImpl and ConnectFlow components to utilize the new popup handling, ensuring popups are managed correctly during the authentication process.
  • Included error handling for blocked popups and ensured proper closure of popups on authentication failure or when OAuth is not needed.

What is this contribution about?

Describe your changes and why they're needed.

Screenshots/Demonstration

Add screenshots or a Loom video if your changes affect the UI.

Review Checklist

  • PR title is clear and descriptive
  • Changes are tested and working
  • Documentation is updated (if needed)
  • No breaking changes

Summary by cubic

Improves the OAuth flow by using a pre-opened popup to avoid browser blockers (especially Safari/iOS). Updates Settings and Connect flows for smoother auth with better error handling and cleanup.

  • New Features

    • Added openOAuthPopup in mesh-sdk (and web) to synchronously open an auth popup; exported via index.
    • authenticateMcp now accepts popupWindow and navigates it when provided; falls back to opening a new popup/tab if needed.
    • Updated SettingsTabContentImpl and ConnectFlow to pre-open the popup in click handlers, pass it to authenticateMcp, and close it on failure or when OAuth isn’t needed; shows a clear toast if the popup was blocked.
  • Migration

    • No breaking changes. For best Safari compatibility, pre-open a popup in the click handler and pass it as popupWindow to authenticateMcp.

Written for commit 7140bd8. Summary will update on new commits.

- Added `openOAuthPopup` function to facilitate synchronous popup opening in click handlers, reducing the likelihood of popup blockers, especially in Safari/iOS.
- Updated `authenticateMcp` to accept a pre-opened popup window, allowing for smoother authentication experiences.
- Modified `SettingsTabContentImpl` and `ConnectFlow` components to utilize the new popup handling, ensuring popups are managed correctly during the authentication process.
- Included error handling for blocked popups and ensured proper closure of popups on authentication failure or when OAuth is not needed.
@github-actions

github-actions Bot commented Jan 27, 2026 •

Copy link
Copy Markdown
Contributor

Release Options

Should a new version be published when this PR is merged?

React with an emoji to vote on the release type:

Reaction Type Next Version
👍 Prerelease 2.54.1-alpha.1
🎉 Patch 2.54.1
❤️ Minor 2.55.0
🚀 Major 3.0.0

Current version: 2.54.0

Deployment

  • Deploy to production (triggers ArgoCD sync after Docker image is published)

@github-actions

Copy link
Copy Markdown
Contributor

🧪 Benchmark

Should we run the Virtual MCP strategy benchmark for this PR?

React with 👍 to run the benchmark.

Reaction Action
👍 Run quick benchmark (10 & 128 tools)

Benchmark will run on the next push after you react.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 5 files

@pedrofrxncx
pedrofrxncx merged commit 0dcdd0a into main Jan 27, 2026
7 checks passed
@pedrofrxncx
pedrofrxncx deleted the fix/store-oauth branch January 27, 2026 16:29
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.

1 participant