shopify_app 14.4.1 → 14.4.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/controllers/shopify_app/sessions_controller.rb +15 -1
- 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: 60cc46a40e00f3426b6953016ec068769159721ba123ea8c46fe70e3134c30e4
|
4
|
+
data.tar.gz: ddb21388d8ea303c87d7c5c58ef62af5ac34cb536d4b3c49a2383f77721a34f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e62cf5da363ed074f959e11034011f9dd4e873b5a3c62bb3d396990900164ceef989d769d6452c0f6f147d9b6b034c8405de5b54305613257930787aa4cc3255
|
7
|
+
data.tar.gz: 832e0f2c0e48bd1dad2fe355fc0175f736851a2554241195109975b0a356dd5f54b23e624c66ff4c3356153e31427230869f55e1f09ab66b0ad98b689d9d91ed
|
data/CHANGELOG.md
CHANGED
@@ -10,14 +10,19 @@ module ShopifyApp
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def new
|
13
|
-
|
13
|
+
if sanitized_shop_name.present?
|
14
|
+
Rails.logger.debug("[ShopifyApp::SessionsController] Sanitized shop name present. Authenticating...")
|
15
|
+
authenticate
|
16
|
+
end
|
14
17
|
end
|
15
18
|
|
16
19
|
def create
|
20
|
+
Rails.logger.debug("[ShopifyApp::SessionsController] Authenticating...")
|
17
21
|
authenticate
|
18
22
|
end
|
19
23
|
|
20
24
|
def enable_cookies
|
25
|
+
Rails.logger.debug("[ShopifyApp::SessionsController] Enabling cookies...")
|
21
26
|
return unless validate_shop_presence
|
22
27
|
|
23
28
|
render(:enable_cookies, layout: false, locals: {
|
@@ -40,6 +45,7 @@ module ShopifyApp
|
|
40
45
|
end
|
41
46
|
|
42
47
|
def granted_storage_access
|
48
|
+
Rails.logger.debug("[ShopifyApp::SessionsController] Granted storage access.")
|
43
49
|
return unless validate_shop_presence
|
44
50
|
|
45
51
|
session['shopify.granted_storage_access'] = true
|
@@ -50,6 +56,7 @@ module ShopifyApp
|
|
50
56
|
end
|
51
57
|
|
52
58
|
def destroy
|
59
|
+
Rails.logger.debug("[ShopifyApp::SessionsController] Resetting session.")
|
53
60
|
reset_session
|
54
61
|
flash[:notice] = I18n.t('.logged_out')
|
55
62
|
redirect_to(login_url_with_optional_shop)
|
@@ -66,18 +73,23 @@ module ShopifyApp
|
|
66
73
|
set_user_tokens_option
|
67
74
|
|
68
75
|
if user_agent_can_partition_cookies
|
76
|
+
Rails.logger.debug("[ShopifyApp::SessionsController] Authenticating with partitioning...")
|
69
77
|
authenticate_with_partitioning
|
70
78
|
else
|
79
|
+
Rails.logger.debug("[ShopifyApp::SessionsController] Authenticating normally...")
|
71
80
|
authenticate_normally
|
72
81
|
end
|
73
82
|
end
|
74
83
|
|
75
84
|
def authenticate_normally
|
76
85
|
if request_storage_access?
|
86
|
+
Rails.logger.debug("[ShopifyApp::SessionsController] Redirecting to request storage access...")
|
77
87
|
redirect_to_request_storage_access
|
78
88
|
elsif authenticate_in_context?
|
89
|
+
Rails.logger.debug("[ShopifyApp::SessionsController] Authenticating in context...")
|
79
90
|
authenticate_in_context
|
80
91
|
else
|
92
|
+
Rails.logger.debug("[ShopifyApp::SessionsController] Authenticating at top level...")
|
81
93
|
authenticate_at_top_level
|
82
94
|
end
|
83
95
|
end
|
@@ -95,6 +107,7 @@ module ShopifyApp
|
|
95
107
|
# rubocop:disable Lint/SuppressedException
|
96
108
|
def set_user_tokens_option
|
97
109
|
if shop_session.blank?
|
110
|
+
Rails.logger.debug("[ShopifyApp::SessionsController] Shop session is blank.")
|
98
111
|
session[:user_tokens] = false
|
99
112
|
return
|
100
113
|
end
|
@@ -117,6 +130,7 @@ module ShopifyApp
|
|
117
130
|
def validate_shop_presence
|
118
131
|
@shop = sanitized_shop_name
|
119
132
|
unless @shop
|
133
|
+
Rails.logger.debug("[ShopifyApp::SessionsController] Invalid shop detected.")
|
120
134
|
render_invalid_shop_error
|
121
135
|
return false
|
122
136
|
end
|
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: 14.4.
|
4
|
+
version: 14.4.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-09-
|
11
|
+
date: 2020-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: browser_sniffer
|