Add OAuth support for desktop platforms (Windows, macOS, Linux) #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
OAuth-protected MCP servers (Atlassian, Notion) were failing on desktop with
UnsupportedError. OAuth was only implemented for web.Implementation
Desktop OAuth handler (
oauth_desktop.dart)url_launcherPlatform-specific imports
oauth_web.dart(unchanged)oauth_desktop.dart(new)Provider changes
kIsWeb→!kIsMobile(4 locations in UI, provider methods)localhost:<random_port>OAuth flow on desktop
Security
Changes
lib/utils/oauth_desktop.dart(+494) - Desktop OAuth implementationlib/utils/oauth_io.dart(+3) - Conditional import exportlib/provider/mcp_server_provider.dart- Enable desktop OAuthlib/utils/oauth_discovery.dart- Platform-aware redirect URIslib/page/setting/mcp_server.dart- Show OAuth UI on desktopdocs/mcp_oauth_servers.md- Update platform support docsBackward compatible. Web OAuth unchanged. Mobile not yet supported.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.