shopify_app 12.0.1 → 12.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/app/assets/javascripts/shopify_app/storage_access.js +4 -4
- data/app/controllers/shopify_app/sessions_controller.rb +6 -8
- data/app/views/shopify_app/sessions/enable_cookies.html.erb +1 -1
- data/app/views/shopify_app/sessions/request_storage_access.html.erb +1 -1
- data/lib/shopify_app/controller_concerns/login_protection.rb +2 -4
- data/lib/shopify_app/version.rb +1 -1
- data/package.json +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dd21d52fbb932f0fef8522975adfb22431ff103d7fa14e4591e0eb24bafeeaec
|
|
4
|
+
data.tar.gz: da650fd1de45574447c28dca6803adf49063e0c879a0eab7d71b2823d3d1f15c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 04f13911597abebbc3e32bc72ac42f9cfe01e2370515935bac076ce9517a44767af1f6185260cbeaae6a5eb2f76f48eb19ff9f013d41504d144ba8b23fb7ca6a
|
|
7
|
+
data.tar.gz: 3474caf61956e3bd8c3b4ae37fb326403493e3391805b85f3962aa753e080b0dfc3c3f82173991b099b804784123d5bf6d108e99ab4f1795c16f4f4cdd1ba862
|
data/CHANGELOG.md
CHANGED
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
window.parent.location.href = this.redirectData.myshopifyUrl + '/admin/apps';
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
StorageAccessHelper.prototype.
|
|
32
|
-
window.location.href = this.redirectData.
|
|
31
|
+
StorageAccessHelper.prototype.redirectToAppHome = function() {
|
|
32
|
+
window.location.href = this.redirectData.appHomeUrl;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
StorageAccessHelper.prototype.sameSiteNoneIncompatible = function(ua) {
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
if (!document.cookie) {
|
|
69
69
|
throw 'Cannot set third-party cookie.'
|
|
70
70
|
}
|
|
71
|
-
this.
|
|
71
|
+
this.redirectToAppHome();
|
|
72
72
|
} catch (error) {
|
|
73
73
|
console.warn('Third party cookies may be blocked.', error);
|
|
74
74
|
this.redirectToAppTLD(ACCESS_DENIED_STATUS);
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
StorageAccessHelper.prototype.handleHasStorageAccess = function() {
|
|
91
91
|
if (sessionStorage.getItem('shopify.granted_storage_access')) {
|
|
92
92
|
// If app was classified by ITP and used Storage Access API to acquire access
|
|
93
|
-
this.
|
|
93
|
+
this.redirectToAppHome();
|
|
94
94
|
} else {
|
|
95
95
|
// If app has not been classified by ITP and still has storage access
|
|
96
96
|
this.redirectToAppTLD(ACCESS_GRANTED_STATUS);
|
|
@@ -20,12 +20,11 @@ module ShopifyApp
|
|
|
20
20
|
|
|
21
21
|
render(:enable_cookies, layout: false, locals: {
|
|
22
22
|
does_not_have_storage_access_url: top_level_interaction_path(
|
|
23
|
-
shop: sanitized_shop_name
|
|
24
|
-
return_to: params[:return_to]
|
|
23
|
+
shop: sanitized_shop_name
|
|
25
24
|
),
|
|
26
25
|
has_storage_access_url: login_url_with_optional_shop(top_level: true),
|
|
27
|
-
|
|
28
|
-
current_shopify_domain: current_shopify_domain
|
|
26
|
+
app_home_url: granted_storage_access_path(shop: sanitized_shop_name),
|
|
27
|
+
current_shopify_domain: current_shopify_domain,
|
|
29
28
|
})
|
|
30
29
|
end
|
|
31
30
|
|
|
@@ -134,12 +133,11 @@ module ShopifyApp
|
|
|
134
133
|
layout: false,
|
|
135
134
|
locals: {
|
|
136
135
|
does_not_have_storage_access_url: top_level_interaction_path(
|
|
137
|
-
shop: sanitized_shop_name
|
|
138
|
-
return_to: session[:return_to]
|
|
136
|
+
shop: sanitized_shop_name
|
|
139
137
|
),
|
|
140
138
|
has_storage_access_url: login_url_with_optional_shop(top_level: true),
|
|
141
|
-
|
|
142
|
-
current_shopify_domain: current_shopify_domain
|
|
139
|
+
app_home_url: granted_storage_access_path(shop: sanitized_shop_name),
|
|
140
|
+
current_shopify_domain: current_shopify_domain,
|
|
143
141
|
}
|
|
144
142
|
)
|
|
145
143
|
end
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
myshopifyUrl: "https://#{current_shopify_domain}",
|
|
33
33
|
hasStorageAccessUrl: "#{has_storage_access_url}",
|
|
34
34
|
doesNotHaveStorageAccessUrl: "#{does_not_have_storage_access_url}",
|
|
35
|
-
|
|
35
|
+
appHomeUrl: "#{app_home_url}"
|
|
36
36
|
},
|
|
37
37
|
},
|
|
38
38
|
)
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
myshopifyUrl: "https://#{current_shopify_domain}",
|
|
25
25
|
hasStorageAccessUrl: "#{has_storage_access_url}",
|
|
26
26
|
doesNotHaveStorageAccessUrl: "#{does_not_have_storage_access_url}",
|
|
27
|
-
|
|
27
|
+
appHomeUrl: "#{app_home_url}"
|
|
28
28
|
},
|
|
29
29
|
},
|
|
30
30
|
)
|
|
@@ -100,10 +100,8 @@ module ShopifyApp
|
|
|
100
100
|
query_params = {}
|
|
101
101
|
query_params[:shop] = sanitized_params[:shop] if params[:shop].present?
|
|
102
102
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
if return_to.present? && return_to_param_required?
|
|
106
|
-
query_params[:return_to] = return_to
|
|
103
|
+
if session[:return_to] && return_to_param_required?
|
|
104
|
+
query_params[:return_to] = session[:return_to]
|
|
107
105
|
end
|
|
108
106
|
|
|
109
107
|
has_referer_shop_name = referer_sanitized_shop_name.present?
|
data/lib/shopify_app/version.rb
CHANGED
data/package.json
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: 12.0.
|
|
4
|
+
version: 12.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shopify
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-02-
|
|
11
|
+
date: 2020-02-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: browser_sniffer
|