Skip to content
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

Fix /consumers authority caching #3327

Merged
merged 12 commits into from
Mar 31, 2021

Conversation

tnorling
Copy link
Collaborator

@tnorling tnorling commented Mar 29, 2021

Last year we made a change to ensure /organizations and /common authority are cached with the tenantId and don't result in cache misses when the tenantId is not explicitly provided. We missed the /consumers authority which is now potentially leaving the cache in a state that contains both /consumers and a tenanted authority for the same set of scopes and throws a multiple authority error.

Also removes multiple authority error which is no longer doing what it was originally intended to do (throw when multiple cache entries existed for the same scope but different authorities). If a cache entry is not found for the provided scopes and authority it should result in a cache miss regardless of what other tokens are available in the cache.

@github-actions github-actions bot added the msal@1.x Related to msal@1.x (implicit flow) label Mar 29, 2021
@tnorling tnorling added this to the msal@1.4.9 milestone Mar 29, 2021
@coveralls
Copy link

coveralls commented Mar 29, 2021

Coverage Status

Coverage remained the same at 83.413% when pulling 66eafec on fix-token-caching-for-consumers-authority into 0b34c58 on dev.

@tnorling tnorling marked this pull request as ready for review March 29, 2021 23:28
Copy link
Member

@sameerag sameerag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm. Approving this for now. I remember there is an MSA passthru use case that needs to be tested here, I will reach out with details. We can unblock this PR but lets follow through.

@github-actions github-actions bot added the samples Related to the samples apps for the library. label Mar 31, 2021
@tnorling tnorling merged commit 5b7356b into dev Mar 31, 2021
@tnorling tnorling deleted the fix-token-caching-for-consumers-authority branch March 31, 2021 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
msal@1.x Related to msal@1.x (implicit flow) samples Related to the samples apps for the library.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants