Skip to content

Commit

Permalink
Pass access scopes on query string
Browse files Browse the repository at this point in the history
  • Loading branch information
andyw8 committed Oct 20, 2022
1 parent 6998df1 commit 3067bc1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Unreleased
----------

* Pass access scopes on query string [#1540](https://github.com/Shopify/shopify_app/pull/1540)
* Update `shopify_api` dependency to 12.2

21.1.0 (Oct 17, 2022)
----------

Expand Down
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PATH
jwt (>= 2.2.3)
rails (> 5.2.1)
redirect_safely (~> 1.0)
shopify_api (~> 12.1)
shopify_api (~> 12.2)
sprockets-rails (>= 2.0.0)

GEM
Expand Down Expand Up @@ -210,7 +210,7 @@ GEM
rubocop (~> 1.35)
ruby-progressbar (1.11.0)
securerandom (0.2.0)
shopify_api (12.1.0)
shopify_api (12.2.0)
concurrent-ruby
hash_diff
httparty
Expand Down Expand Up @@ -263,4 +263,4 @@ DEPENDENCIES
webmock

BUNDLED WITH
2.3.7
2.3.22
4 changes: 4 additions & 0 deletions lib/shopify_app/controller_concerns/login_protection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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(",")
end

query_params[:top_level] = true if top_level
query_params
end
Expand Down
3 changes: 2 additions & 1 deletion shopify_app.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ Gem::Specification.new do |s|
s.add_runtime_dependency("jwt", ">= 2.2.3")
s.add_runtime_dependency("rails", "> 5.2.1")
s.add_runtime_dependency("redirect_safely", "~> 1.0")
s.add_runtime_dependency("shopify_api", "~> 12.1")
# TODO: Need to make release first
s.add_runtime_dependency("shopify_api", "~> 12.2")
s.add_runtime_dependency("sprockets-rails", ">= 2.0.0")

s.add_development_dependency("byebug")
Expand Down

0 comments on commit 3067bc1

Please sign in to comment.