-
Notifications
You must be signed in to change notification settings - Fork 699
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
Pass access scopes on query string #1540
Conversation
@@ -167,6 +167,10 @@ def login_url_params(top_level:) | |||
query_params[:host] ||= host | |||
end | |||
|
|||
if params[:access_scopes].present? | |||
query_params[:scope] = params[:access_scopes].join(",") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other places in this method use ||=
but I don't see a need for that here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me, if we get query args we should override them, assuming we can trust the source - is this secured in any way, like with an HMAC?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Discussed internally, we do not see any issue here)
3067bc1
to
419ac14
Compare
03c41da
to
0cc7769
Compare
0cc7769
to
e2d065d
Compare
21.1.1 (Oct 20, 2022) | ||
---------- | ||
* Updates dependency to `shopify_api` to 12.2 to fix error with host_name argument. | ||
|
||
21.1.0 (Oct 17, 2022) | ||
---------- | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed these for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a general question, but if there is nothing to change then I'm happy with this.
@@ -167,6 +167,10 @@ def login_url_params(top_level:) | |||
query_params[:host] ||= host | |||
end | |||
|
|||
if params[:access_scopes].present? | |||
query_params[:scope] = params[:access_scopes].join(",") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me, if we get query args we should override them, assuming we can trust the source - is this secured in any way, like with an HMAC?
/shipit |
Co-authored-by: Andy Waite <[email protected]>
What this PR does
See explanation in related PR: Shopify/shopify-api-ruby#1023
Reviewer's guide to testing
Use dev version of https://shopify-graphiql-app.shopifycloud.com/
Checklist
Before submitting the PR, please consider if any of the following are needed:
CHANGELOG.md
if the changes would impact usersUpdateREADME.md
, if appropriate.Update any relevant pages in/docs
, if necessaryFor security fixes, the Disclosure Policy must be followed.