Skip to content

Conversation

@rayluo
Copy link
Contributor

@rayluo rayluo commented Jun 18, 2019

Discovered in PR #61 's second finding (thank you Jann!), the previous default None value in acquire_token_by_username_password(..., scopes=None) would cause an exception in our internal helper decorate_scope().

The fix is to change the previously optional scopes parameter to required.
This kind of api surface change would usually be a breaking change, but in this case it is not,
because the previous default value would cause exception so it was in fact required.

FWIW, you can still explicitly use empty list [] as scope,
and the response would contain id_token and refresh_token, but no access_token.

The previous default None value would cause an exception in our code decorate_scope().
The fix is to change the previously optional scopes parameter to required.
This kind of api surface change would usually be a breaking change, but in this case it is not,
because the previous default value would cause exception so it was in fact required.
FWIW, you can still explicitly use empty list [] as scope,
and the response would contain id_token and refresh_token, but no access_token.
@abhidnya13 abhidnya13 self-requested a review June 18, 2019 17:34
Copy link
Contributor

@abhidnya13 abhidnya13 left a comment

Choose a reason for hiding this comment

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

:shipit:

@rayluo rayluo merged commit 54dc244 into dev Jun 18, 2019
@rayluo rayluo deleted the scopes-are-required-in-username-password-flow branch June 18, 2019 17:38
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.

3 participants