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

Allow null Scopes in ExchangeCodeForTokenAsync() #1488

Merged
merged 2 commits into from
Dec 23, 2019

Conversation

MachWerx
Copy link
Contributor

I added the same check and a test for ExchangeCodeForTokenAsync() in the second CL.

Previously, using an initializer with Scopes set to null would crash
when CreateAuthorizationCodeRequest() was called. Now, the null Scopes
propogates safely through as a null Scope for AuthorizationCodeRequestUrl.

This is necessary because some OAuth sites do not recognize the "scope"
parameter and will return an error instead of the authorization token if
the URL contains it.

I have updated the tests and added one for the default authorization
code request.
Added missing code and test for the ExchangeCodeForTokenAsync() method
as well.
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 20, 2019
Copy link
Contributor

@chrisdunelm chrisdunelm left a comment

Choose a reason for hiding this comment

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

LGTM

@chrisdunelm chrisdunelm merged commit c08e1a6 into googleapis:master Dec 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants