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

Pass access scopes on query string #1540

Merged
merged 1 commit into from
Oct 25, 2022

Conversation

andyw8
Copy link
Contributor

@andyw8 andyw8 commented Oct 19, 2022

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:

  • Update CHANGELOG.md if the changes would impact users
  • Update README.md, if appropriate.
  • Update any relevant pages in /docs, if necessary
  • For security fixes, the Disclosure Policy must be followed.

@@ -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(",")
Copy link
Contributor Author

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.

Copy link
Contributor

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?

Copy link
Contributor Author

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)

@andyw8 andyw8 force-pushed the andyw8/pass-access-scopes-on-query-string branch 2 times, most recently from 3067bc1 to 419ac14 Compare October 20, 2022 14:45
@andyw8 andyw8 marked this pull request as ready for review October 20, 2022 14:55
@andyw8 andyw8 force-pushed the andyw8/pass-access-scopes-on-query-string branch 3 times, most recently from 03c41da to 0cc7769 Compare October 25, 2022 17:02
@andyw8 andyw8 force-pushed the andyw8/pass-access-scopes-on-query-string branch from 0cc7769 to e2d065d Compare October 25, 2022 17:03
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)
----------

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed these for consistency.

Copy link
Contributor

@paulomarg paulomarg left a 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(",")
Copy link
Contributor

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?

@andyw8
Copy link
Contributor Author

andyw8 commented Oct 25, 2022

/shipit

@andyw8 andyw8 merged commit 91ee7a0 into main Oct 25, 2022
@andyw8 andyw8 deleted the andyw8/pass-access-scopes-on-query-string branch October 25, 2022 17:28
fabriazza pushed a commit to fabriazza/shopify_app that referenced this pull request Feb 1, 2023
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