-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated authorization to the latest agent workflow. (#197)
CLOSE https://linear.app/sourcegraph/issue/CODY-4620/cody-does-not-stay-signed-in-after-closing-visual-studio 1. Server endpoint and access token is no longer set via `ExtensionConfiguration`, because in a specific scenario, it could cause invalidating an access token when VS is restarted (probably agent related bug when migrated to the new secret storage driven sign in workflow). 2. Fixed NRE in the `SecretStorageService` when `Set()` method is called with empty/null key (not allowed by `IVsCredentialStorageService` implementation). 3. Moved event `AuthorizationDetailsChanged` from `UserSettingsService` to `SecretStorageService` - introduced `IsEndpoint()` as a heuristic logic to detect if the agent changed account and/or access token. 4. Removed code handling `signout/signin` commands from `HandleAuthCommand()` - the agent handles this workflows themselves by accessing secret storage. 5. Added logging to `SecretStorageService` and try/catch statements. 6. Updated UI tests infrastructure to allow setting access token explicitly during run-time. ## Test plan 1. Test sign in / sign out workflows 7. Check if it's still in logged state when Visual Studio is restarted
- Loading branch information
1 parent
d1ed3ba
commit b4b9c37
Showing
10 changed files
with
124 additions
and
52 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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