Skip to content

fix: invalidate restored device auth sessions after token removal - #792

Draft
msivasubramaniaan wants to merge 1 commit into
che-incubator:mainfrom
msivasubramaniaan:fix-copilot-device-auth-session-restore
Draft

fix: invalidate restored device auth sessions after token removal#792
msivasubramaniaan wants to merge 1 commit into
che-incubator:mainfrom
msivasubramaniaan:fix-copilot-device-auth-session-restore

Conversation

@msivasubramaniaan

Copy link
Copy Markdown
Collaborator

What does this PR do?

Fixes GitHub Copilot Device Authentication sessions being restored by VS Code after the Device Authentication token has been removed.

The PR tracks authentication sessions created using Device Authentication in VS Code SecretStorage. During workspace restart, persisted Device Authentication sessions are removed when Device Authentication is no longer active.

The provider also avoids immediately recreating a session using a fallback PAT/git-credential token after removing the persisted Device Authentication session, requiring the user to authenticate again.

What issues does this PR fix?

Fixes the issue where removing the GitHub Copilot Device Authentication token from one workspace does not invalidate the persisted authentication session in other existing workspaces.

After removing the Kubernetes device-authentication-secret-* secret, another workspace could restore the previously persisted VS Code authentication session after restart and continue using GitHub Copilot without re-authentication.

How to test this PR?

Does this PR contain changes that override default upstream Code-OSS behavior?

  • the PR contains changes in the code folder (you can skip it if your changes are placed in a che extension )
  • the corresponding items were added to the CHANGELOG.md file
  • rules for automatic git rebase were added to the .rebase folder

@github-actions

github-actions Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Click here to review and test in web IDE: Contribute

@github-actions

Copy link
Copy Markdown
Contributor

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