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

Add test coverage of default scopes #329

Open
chlowell opened this issue Jul 15, 2022 · 0 comments
Open

Add test coverage of default scopes #329

chlowell opened this issue Jul 15, 2022 · 0 comments
Labels

Comments

@chlowell
Copy link
Collaborator

chlowell commented Jul 15, 2022

  • MSAL needs to add "openid profile offline_access" to request in order for caching to work. These should just be ignored when it comes to caching.

openid + profile tells AAD to issue an IdToken
offline_access tells AAD to issue a refresh token.

Originally posted by @bgavrilMS in #327 (comment)

I observe this behavior empirically, and the relevant code looks correct, but I don't find any unit tests covering it. My first thought is, call the From* methods of accesstokens.Client, verify the scopes with a fake urlFormCaller. It would be nice to test this at the application level instead, say with a fake HTTP client, but faking everything else necessary to make that work would be more complex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant