You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add client ID fallback for MCP OAuth when Dynamic Client Registration fails (microsoft#255633)
* Initial plan
* Add client ID fallback functionality for MCP OAuth when DCR fails
Co-authored-by: TylerLeonhardt <[email protected]>
* Add client secret support for MCP OAuth when DCR fails
Co-authored-by: TylerLeonhardt <[email protected]>
* Merge client ID and client secret prompts into single $promptForClientDetails method
Co-authored-by: TylerLeonhardt <[email protected]>
* Add persistent client secret storage for MCP OAuth authentication
Co-authored-by: TylerLeonhardt <[email protected]>
* Consolidate client credentials storage in SecretStorage
Co-authored-by: TylerLeonhardt <[email protected]>
* Consolidate getClientId and getClientSecret into single getClientDetails method
Co-authored-by: TylerLeonhardt <[email protected]>
* Add modal dialog and improve UX for client registration prompts
- Add modal dialog before prompting for client details to explain DCR not supported
- Include redirect URI information in modal dialog (http://localhost:*, https://vscode.dev/redirect)
- Use shared title "Add Client Registration Details" across multi-step quick picks
- Remove "please" from prompts to keep them concise
- Remove unnecessary validateInput function for client secret
- Improve overall user experience flow
Co-authored-by: TylerLeonhardt <[email protected]>
* misc fixes
* polish
* No longer need to fill in urls
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
// Show modal dialog first to explain the situation and get user consent
550
+
constresult=awaitthis.dialogService.prompt({
551
+
type: Severity.Info,
552
+
message: nls.localize('dcrNotSupported',"Dynamic Client Registration not supported"),
553
+
detail: nls.localize('dcrNotSupportedDetail',"The authorization server '{0}' does not support automatic client registration. Do you want to proceed by manually providing a client registration (client ID)?\n\nNote: When registering your OAuth application, make sure to include these redirect URIs:\nhttp://127.0.0.1:33418\nhttps://vscode.dev/redirect",authorizationServerUrl),
prompt: nls.localize('clientIdPrompt',"Enter an existing client ID that has been registered with the following redirect URIs: http://127.0.0.1:33418, https://vscode.dev/redirect"),
575
+
placeHolder: nls.localize('clientIdPlaceholder',"OAuth client ID (azye39d...)"),
576
+
ignoreFocusLost: true,
577
+
validateInput: async(value: string)=>{
578
+
if(!value||value.trim().length===0){
579
+
returnnls.localize('clientIdRequired',"Client ID is required");
prompt: nls.localize('clientSecretPrompt',"(optional) Enter an existing client secret associated with the client id '{0}' or leave this field blank",clientId),
592
+
placeHolder: nls.localize('clientSecretPlaceholder',"OAuth client secret (wer32o50f...) or leave it blank"),
0 commit comments