Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 9, 2025

When SAML authentication fails, users currently see an error dialog with only an "OK" button. Clicking it either disables the extension entirely or continues with reduced functionality. Users must reload VS Code to retry authentication.

Changes

Added retry capability to SAML error handling:

  • Both SAML error dialogs now include a "Reauthenticate" button alongside "OK"
  • Clicking "Reauthenticate" triggers a new SAML authentication flow via showSamlMessageAndAuth()
  • Successful reauthentication allows the extension to continue initialization

Implemented retrySamlAuth() helper function:

  • Encapsulates retry authentication logic to avoid duplication
  • Returns repositories that still lack SAML access after retry

Different success criteria by scenario:

  • Full failure (all repos): Requires complete success to proceed
  • Partial failure (some repos): Accepts any improvement and continues with available repositories
// Before
await vscode.window.showErrorMessage('SAML access was not provided...', { modal: true });

// After  
const choice = await vscode.window.showErrorMessage(
  'SAML access was not provided...', 
  { modal: true }, 
  reauthenticate
);
if (choice === reauthenticate) {
  const stillMissingAfterRetry = await retrySamlAuth(stillMissing);
  // Continue if successful...
}
Original prompt

This section details on the original issue you should resolve

<issue_title>Add "Reauthenticate" button to SAML error</issue_title>
<issue_description>From @joyceerhl:

image
</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 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.

Copilot AI and others added 3 commits December 9, 2025 12:05
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot AI changed the title [WIP] Add reauthenticate button to SAML error page Add "Reauthenticate" button to SAML error dialogs Dec 9, 2025
Copilot AI requested a review from alexr00 December 9, 2025 12:21
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.

Add "Reauthenticate" button to SAML error

2 participants