shopify_app 7.2.5 → 7.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +7 -1
- data/lib/shopify_app/login_protection.rb +10 -1
- data/lib/shopify_app/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9335f7bf026825facf051b989eea2e4b3e30e9e
|
4
|
+
data.tar.gz: c7ef43c749908fe81968378060687a6dd6621019
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f23af64be558128afc5e8ac8a6fd2db88d6048e684a1305ca03be2cba181756f2ad58a5df462f695bc8d85c530721b3852c65d3697f638e791a78b3b9dc8b07
|
7
|
+
data.tar.gz: d092113b766bf4fc2ae0e661ea50a1467284c7628a8fc5d1c4259e6c70ea48641de695d5051841cccac880d2284bd2be131f75114415f66adfe13b8d847e61af
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -285,6 +285,12 @@ ShopifyApp.configure do |config|
|
|
285
285
|
end
|
286
286
|
```
|
287
287
|
|
288
|
+
You also need to have write_script_tags permission in the config scope in order to add script tags automatically:
|
289
|
+
|
290
|
+
```ruby
|
291
|
+
config.scope = '... , write_script_tags'
|
292
|
+
```
|
293
|
+
|
288
294
|
Scripttags are created in the same way as the Webhooks, with a background job which will create the required scripttags.
|
289
295
|
|
290
296
|
If `src` responds to `call` its return value will be used as the scripttag's source. It will be called on scripttag creation and deletion.
|
@@ -339,7 +345,7 @@ forceRedirect: <%= Rails.env.development? || Rails.env.test? ? 'false' : 'true'
|
|
339
345
|
App Tunneling
|
340
346
|
-------------
|
341
347
|
|
342
|
-
For certain features like Application Proxy or Webhooks to receive requests from Shopify, your app needs to be on a publicly visible URL. This can be a hurdle during development or testing on a local machine. Fortunately, this can be overcome by employing a tunneling service like [Forward](https://forwardhq.com/), [RequestBin](requestb.in/), [ngrok](https://ngrok.com/) etc. These tools allow you to create a secure tunnel from the public Internet to your local machine.
|
348
|
+
For certain features like Application Proxy or Webhooks to receive requests from Shopify, your app needs to be on a publicly visible URL. This can be a hurdle during development or testing on a local machine. Fortunately, this can be overcome by employing a tunneling service like [Forward](https://forwardhq.com/), [RequestBin](https://requestb.in/), [ngrok](https://ngrok.com/) etc. These tools allow you to create a secure tunnel from the public Internet to your local machine.
|
343
349
|
|
344
350
|
Tunneling is also useful for working the the embedded app sdk to solve mixed content issues since most tunnles provide ssl.
|
345
351
|
|
@@ -2,6 +2,8 @@ module ShopifyApp
|
|
2
2
|
module LoginProtection
|
3
3
|
extend ActiveSupport::Concern
|
4
4
|
|
5
|
+
class ShopifyDomainNotFound < StandardError; end
|
6
|
+
|
5
7
|
included do
|
6
8
|
rescue_from ActiveResource::UnauthorizedAccess, :with => :close_session
|
7
9
|
end
|
@@ -86,7 +88,7 @@ module ShopifyApp
|
|
86
88
|
message: 'Shopify.API.remoteRedirect',
|
87
89
|
data: { location: normalizedLink.href }
|
88
90
|
});
|
89
|
-
window.parent.postMessage(data, "https://#{
|
91
|
+
window.parent.postMessage(data, "https://#{current_shopify_domain}");
|
90
92
|
}
|
91
93
|
|
92
94
|
</script>
|
@@ -97,6 +99,13 @@ module ShopifyApp
|
|
97
99
|
)
|
98
100
|
end
|
99
101
|
|
102
|
+
def current_shopify_domain
|
103
|
+
shopify_domain = sanitized_shop_name || session[:shopify_domain]
|
104
|
+
return shopify_domain if shopify_domain.present?
|
105
|
+
|
106
|
+
raise ShopifyDomainNotFound
|
107
|
+
end
|
108
|
+
|
100
109
|
def sanitized_shop_name
|
101
110
|
@sanitized_shop_name ||= sanitize_shop_param(params)
|
102
111
|
end
|
data/lib/shopify_app/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shopify_app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.2.
|
4
|
+
version: 7.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|