New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add msal cache 1.0 -> 1.1 upgrade #2664
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a good work-around. I feel good about the transparent upgrade. Possible that we could see some flapping for folks that consume PR/Dev versions before we ship it, but I think even in though cases, as you mentioned it just means the old CLI will think you are logged out and you'll log back in and things should be fine. Running the new one again will have the side effect of logging you out of the old one, but that seems fine.
Thanks for making the logic robust against format changes in the structure of the cache.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few comments... nothing blocking.
Thank you! This explains a lot!
@ellismg Basically both versions of the cli will work with the cache in most cases, since the cache is actually iterated through instead of referenced by key. The only caveat is with mixed-versions + login.
|
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash:
pwsh:
WindowsPowerShell install
MSI install
Standalone Binary
MSIContainer
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
When retrieving cache entries, automatically upgrade cache entries that were saved in msal cache v1.0 format to v1.1 format to avoid stale cache entries causing random auth failures.
Related to AzureAD/microsoft-authentication-library-for-go#453
Fixes #2659