shopify_app 14.4.1 → 14.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c53834e226dee411a573d23cc538fef0d371cd087e0983afecdcbb43c1fa588b
4
- data.tar.gz: 4878d4a4e7d87ac44262936c1dc9167d7301386370822e039535cf9aa1d5b7a8
3
+ metadata.gz: 60cc46a40e00f3426b6953016ec068769159721ba123ea8c46fe70e3134c30e4
4
+ data.tar.gz: ddb21388d8ea303c87d7c5c58ef62af5ac34cb536d4b3c49a2383f77721a34f9
5
5
  SHA512:
6
- metadata.gz: 6d2e00ff84e56bbfb9b1f208bdcce0150dbb17bcb5ed32986c3edfe5436ae782a84c3953031537ac666056a1e1415fb7e613f6414be1c56dbe5ba1c288757292
7
- data.tar.gz: 6145b1164d52407d4906a19633cc75773c18879c821fcba90b475e311abbfd838437274b85d00646fde3f3d1170a5229ee7a972fcf774cb5d3b345ef16fcab44
6
+ metadata.gz: e62cf5da363ed074f959e11034011f9dd4e873b5a3c62bb3d396990900164ceef989d769d6452c0f6f147d9b6b034c8405de5b54305613257930787aa4cc3255
7
+ data.tar.gz: 832e0f2c0e48bd1dad2fe355fc0175f736851a2554241195109975b0a356dd5f54b23e624c66ff4c3356153e31427230869f55e1f09ab66b0ad98b689d9d91ed
@@ -1,3 +1,7 @@
1
+ 14.4.2
2
+ ------
3
+ * Add debug logs in sessions controller
4
+
1
5
  14.4.1
2
6
  ------
3
7
  * Add debug logs for investigating authentication issues
@@ -10,14 +10,19 @@ module ShopifyApp
10
10
  end
11
11
 
12
12
  def new
13
- authenticate if sanitized_shop_name.present?
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
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ShopifyApp
3
- VERSION = '14.4.1'
3
+ VERSION = '14.4.2'
4
4
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shopify_app",
3
- "version": "14.4.1",
3
+ "version": "14.4.2",
4
4
  "repository": "git@github.com:Shopify/shopify_app.git",
5
5
  "author": "Shopify",
6
6
  "license": "MIT",
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.1
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-17 00:00:00.000000000 Z
11
+ date: 2020-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: browser_sniffer