forked from aws/aws-toolkit-vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(auth): malformed SSO cache didn't prompt reauth
Problem: When we loaded sso cache from disk, we would only invalidate (leading to a reauth prompt) if the cache file was missing. But if the cache file was present, though its content was malformed, we would incorrectly treat it as recoverable by throwing instead of returning undefined. Solution: If we detect a SyntaxError treat it as non-recoverable, meaning it will trigger a reauth. Also added some code to validate the content of the SSO cache we loaded from disk to ensure it is what we expected. Signed-off-by: nkomonen-amazon <[email protected]>
- Loading branch information
1 parent
226dd6f
commit 2a4f7ba
Showing
2 changed files
with
21 additions
and
1 deletion.
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