Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Fixes #98: Do not send empty scopes to an auth server #154

Merged
merged 6 commits into from
Aug 3, 2020

Conversation

postatum
Copy link
Contributor

Fixes #98

@postatum postatum requested a review from jstoiko July 27, 2020 08:04
Copy link
Contributor

@jstoiko jstoiko left a comment

Choose a reason for hiding this comment

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

I think we should let the user have control over the value of scope that is sent to the server. If scopes is set to "" or [] then we should send an empty string (that's what sanitizeScope() currently does). If scopes is undefined (not set), then we shouldn't send it at all (that part is what needs to be fixed).

test/owner.js Outdated Show resolved Hide resolved
@postatum
Copy link
Contributor Author

I think we should let the user have control over the value of scope that is sent to the server. If scopes is set to "" or [] then we should send an empty string (that's what sanitizeScope() currently does). If scopes is undefined (not set), then we shouldn't send it at all (that part is what needs to be fixed).

Reworked.

@postatum postatum requested a review from jstoiko July 30, 2020 09:49
@postatum postatum merged commit a237644 into master Aug 3, 2020
@postatum postatum deleted the i98_omit_empty_scopes branch August 3, 2020 07:16
@postatum postatum mentioned this pull request Aug 3, 2020
clancy-au pushed a commit to digiwise/js-client-oauth2 that referenced this pull request Apr 21, 2021
…ulesoft-labs#154)

If `scopes` is set to `""` or `[]` then we should send an empty string.
If `scopes` is undefined (not set), then we don't send it at all.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scope parameter should not be sent when undefined
2 participants