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

[Bug] Microsoft.Identity.Web should not call GetAccountsAsync() #295

Closed
jmprieur opened this issue Jul 7, 2020 · 2 comments
Closed

[Bug] Microsoft.Identity.Web should not call GetAccountsAsync() #295

jmprieur opened this issue Jul 7, 2020 · 2 comments
Assignees
Labels
bug Something isn't working fixed P1

Comments

@jmprieur
Copy link
Collaborator

jmprieur commented Jul 7, 2020

Which Version of Microsoft Identity Web are you using ?
Note that to get help, you need to run the latest version.

Where is the issue?
B2C scenario

Other? - please describe;

Repro
TokenAcquisition calls GetAccountsAsync in the case of B2C to remove the accounts. However, this will call the token cache serialiation with no suggested cache key.

https://github.com/AzureAD/microsoft-identity-web/search?q=GetAccountsAsync&unscoped_q=GetAccountsAsync

Expected behavior
When signing out, the token for a user are removed from the cache

Actual behavior
The cache is not cleared as no account is found

Possible Solution

  • We should probably think of adding all the tokens for all the policies of a given account in the same token cache, which we could clear at once.
  • then we should not call GetAccountsAsync(), but GetAccountAsync(account-without-policy)

Additional context/ Logs / Screenshots
Add any other context about the problem here, such as logs and screenshots.

@jennyf19
Copy link
Collaborator

Part of this pr

@pmaytak
Copy link
Contributor

pmaytak commented Jul 25, 2020

@pmaytak pmaytak closed this as completed Jul 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed P1
Projects
None yet
Development

No branches or pull requests

4 participants