fix: invalidate restored device auth sessions after token removal - #792
Draft
msivasubramaniaan wants to merge 1 commit into
Draft
Conversation
msivasubramaniaan
requested review from
RomanNikitenko,
azatsarynnyy,
rgrunber and
vitaliy-guliy
as code owners
August 18, 2026 12:27
msivasubramaniaan
marked this pull request as draft
August 18, 2026 12:27
Contributor
Contributor
|
Pull Request images published ✨ Editor amd64: quay.io/che-incubator-pull-requests/che-code:pr-792-amd64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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?
git rebasewere added to the .rebase folder