Skip to content

Conversation

@zateutsch
Copy link
Contributor

Fixes #

PR Type

What kind of change does this PR introduce?

Feature

What is the current behavior?

GetTokenAsync always requests token with scopes set in class construction.

What is the new behavior?

Optional parameter for GetTokenAsync to supply scopes specific to token request.

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Contains NO breaking changes

Other information

Change was already included in documentation, must have been lost along the way.

@ghost
Copy link

ghost commented Jan 26, 2022

Thanks zateutsch for opening a Pull Request! The reviewers will test the PR and highlight if there is any merge conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌

@nmetulev nmetulev merged commit e11fe16 into CommunityToolkit:main Jan 26, 2022
@michael-hawker
Copy link
Member

Hmm.. I thought there was a reason we didn't do this as there was an underlying issue trying to change the requested scope later...

@shweaver-MSFT mind filling the knowledge gap here?

@michael-hawker
Copy link
Member

@zateutsch found the previous reversion of this in PR #122 from @shweaver-MSFT. FYI @nmetulev.

@shweaver-MSFT
Copy link
Member

@michael-hawker, good job digging up that older PR. You are so right, I removed that functionality because WAM will fail if you pass in new scopes. To quote myself:

WAM doesn't support incremental consent, so this function is deceiving. Only pre-authorized scopes will return a token successfully, in which case they should be included with the rest of the scopes provided during provider construction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants