shopify_app 13.2.0 → 20.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/CODEOWNERS +1 -0
- data/.github/ISSUE_TEMPLATE/bug-report.md +63 -0
- data/.github/ISSUE_TEMPLATE/config.yml +1 -0
- data/.github/ISSUE_TEMPLATE/feature-request.md +33 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +22 -0
- data/.github/workflows/build.yml +40 -0
- data/.github/workflows/cla.yml +22 -0
- data/.github/workflows/close-waiting-for-response-issues.yml +20 -0
- data/.github/workflows/release.yml +24 -0
- data/.github/workflows/remove-labels-on-activity.yml +16 -0
- data/.github/workflows/rubocop.yml +22 -0
- data/.github/workflows/stale.yml +31 -0
- data/.gitignore +1 -2
- data/.nvmrc +1 -1
- data/.rubocop.yml +2 -0
- data/.ruby-version +1 -1
- data/CHANGELOG.md +221 -0
- data/CONTRIBUTING.md +81 -0
- data/Gemfile +5 -2
- data/Gemfile.lock +248 -0
- data/README.md +74 -563
- data/Rakefile +4 -3
- data/SECURITY.md +59 -0
- data/app/assets/images/storage_access.svg +1 -2
- data/app/assets/javascripts/shopify_app/app_bridge_3.1.1.js +10 -0
- data/app/assets/javascripts/shopify_app/app_bridge_redirect.js +22 -0
- data/app/assets/javascripts/shopify_app/app_bridge_utils_3.1.1.js +1 -0
- data/app/assets/javascripts/shopify_app/post_redirect.js +9 -0
- data/app/assets/javascripts/shopify_app/redirect.js +10 -14
- data/app/assets/javascripts/shopify_app/storage_access.js +5 -10
- data/app/assets/javascripts/shopify_app/top_level_interaction.js +1 -1
- data/app/controllers/concerns/shopify_app/authenticated.rb +4 -0
- data/app/controllers/concerns/shopify_app/ensure_authenticated_links.rb +39 -0
- data/app/controllers/concerns/shopify_app/require_known_shop.rb +48 -0
- data/app/controllers/concerns/shopify_app/shop_access_scopes_verification.rb +40 -0
- data/app/controllers/shopify_app/authenticated_controller.rb +1 -0
- data/app/controllers/shopify_app/callback_controller.rb +56 -77
- data/app/controllers/shopify_app/extension_verification_controller.rb +2 -7
- data/app/controllers/shopify_app/sessions_controller.rb +33 -117
- data/app/controllers/shopify_app/webhooks_controller.rb +5 -26
- data/app/views/shopify_app/partials/_button_styles.html.erb +41 -36
- data/app/views/shopify_app/partials/_card_styles.html.erb +3 -3
- data/app/views/shopify_app/partials/_empty_state_styles.html.erb +28 -59
- data/app/views/shopify_app/partials/_form_styles.html.erb +56 -0
- data/app/views/shopify_app/partials/_layout_styles.html.erb +16 -1
- data/app/views/shopify_app/partials/_typography_styles.html.erb +6 -6
- data/app/views/shopify_app/sessions/enable_cookies.html.erb +2 -7
- data/app/views/shopify_app/sessions/new.html.erb +38 -110
- data/app/views/shopify_app/sessions/request_storage_access.html.erb +12 -12
- data/app/views/shopify_app/sessions/top_level_interaction.html.erb +21 -22
- data/app/views/shopify_app/shared/post_redirect_to_auth_shopify.html.erb +13 -0
- data/app/views/shopify_app/shared/redirect.html.erb +2 -2
- data/config/locales/de.yml +11 -11
- data/config/locales/ja.yml +4 -4
- data/config/locales/nl.yml +2 -2
- data/config/locales/th.yml +4 -4
- data/config/locales/vi.yml +22 -0
- data/config/locales/zh-CN.yml +2 -2
- data/config/routes.rb +20 -12
- data/docs/Quickstart.md +19 -83
- data/docs/Releasing.md +18 -15
- data/docs/Troubleshooting.md +140 -5
- data/docs/Upgrading.md +247 -0
- data/docs/shopify_app/authentication.md +128 -0
- data/docs/shopify_app/content-security-policy.md +10 -0
- data/docs/shopify_app/engine.md +82 -0
- data/docs/shopify_app/generators.md +127 -0
- data/docs/shopify_app/handling-access-scopes-changes.md +24 -0
- data/docs/shopify_app/script-tags.md +28 -0
- data/docs/shopify_app/session-repository.md +88 -0
- data/docs/shopify_app/testing.md +38 -0
- data/docs/shopify_app/webhooks.md +72 -0
- data/karma.conf.js +1 -1
- data/lib/generators/shopify_app/add_after_authenticate_job/add_after_authenticate_job_generator.rb +10 -9
- data/lib/generators/shopify_app/add_after_authenticate_job/templates/after_authenticate_job.rb +1 -0
- data/lib/generators/shopify_app/add_marketing_activity_extension/add_marketing_activity_extension_generator.rb +4 -3
- data/lib/generators/shopify_app/add_webhook/add_webhook_generator.rb +15 -14
- data/lib/generators/shopify_app/add_webhook/templates/webhook_job.rb.tt +9 -1
- data/lib/generators/shopify_app/app_proxy_controller/app_proxy_controller_generator.rb +7 -6
- data/lib/generators/shopify_app/app_proxy_controller/templates/app_proxy_controller.rb +2 -1
- data/lib/generators/shopify_app/app_proxy_controller/templates/app_proxy_route.rb +1 -1
- data/lib/generators/shopify_app/authenticated_controller/authenticated_controller_generator.rb +4 -4
- data/lib/generators/shopify_app/controllers/controllers_generator.rb +5 -4
- data/lib/generators/shopify_app/home_controller/home_controller_generator.rb +27 -4
- data/lib/generators/shopify_app/home_controller/templates/home_controller.rb +12 -2
- data/lib/generators/shopify_app/home_controller/templates/index.html.erb +74 -16
- data/lib/generators/shopify_app/home_controller/templates/unauthenticated_home_controller.rb +16 -0
- data/lib/generators/shopify_app/install/install_generator.rb +52 -40
- data/lib/generators/shopify_app/install/templates/embedded_app.html.erb +5 -2
- data/lib/generators/shopify_app/install/templates/flash_messages.js +0 -2
- data/lib/generators/shopify_app/install/templates/session_store.rb +2 -1
- data/lib/generators/shopify_app/install/templates/shopify_app.js +1 -1
- data/lib/generators/shopify_app/install/templates/shopify_app.rb.tt +43 -5
- data/lib/generators/shopify_app/install/templates/shopify_app_importmap.js +13 -0
- data/lib/generators/shopify_app/products_controller/products_controller_generator.rb +19 -0
- data/lib/generators/shopify_app/products_controller/templates/products_controller.rb +8 -0
- data/lib/generators/shopify_app/rotate_shopify_token_job/rotate_shopify_token_job_generator.rb +4 -4
- data/lib/generators/shopify_app/rotate_shopify_token_job/templates/rotate_shopify_token.rake +1 -0
- data/lib/generators/shopify_app/rotate_shopify_token_job/templates/rotate_shopify_token_job.rb +1 -1
- data/lib/generators/shopify_app/routes/routes_generator.rb +6 -5
- data/lib/generators/shopify_app/routes/templates/routes.rb +5 -5
- data/lib/generators/shopify_app/shop_model/shop_model_generator.rb +35 -7
- data/lib/generators/shopify_app/shop_model/templates/db/migrate/add_shop_access_scopes_column.erb +5 -0
- data/lib/generators/shopify_app/shop_model/templates/shop.rb +2 -1
- data/lib/generators/shopify_app/shopify_app_generator.rb +4 -3
- data/lib/generators/shopify_app/user_model/templates/db/migrate/add_user_access_scopes_column.erb +5 -0
- data/lib/generators/shopify_app/user_model/templates/user.rb +2 -1
- data/lib/generators/shopify_app/user_model/user_model_generator.rb +35 -7
- data/lib/generators/shopify_app/views/views_generator.rb +5 -4
- data/lib/shopify_app/access_scopes/noop_strategy.rb +13 -0
- data/lib/shopify_app/access_scopes/shop_strategy.rb +24 -0
- data/lib/shopify_app/access_scopes/user_strategy.rb +41 -0
- data/lib/shopify_app/configuration.rb +58 -11
- data/lib/shopify_app/controller_concerns/app_proxy_verification.rb +4 -4
- data/lib/shopify_app/controller_concerns/csrf_protection.rb +16 -0
- data/lib/shopify_app/controller_concerns/embedded_app.rb +6 -3
- data/lib/shopify_app/controller_concerns/ensure_billing.rb +243 -0
- data/lib/shopify_app/controller_concerns/frame_ancestors.rb +16 -0
- data/lib/shopify_app/controller_concerns/itp.rb +3 -3
- data/lib/shopify_app/controller_concerns/localization.rb +1 -0
- data/lib/shopify_app/controller_concerns/login_protection.rb +105 -90
- data/lib/shopify_app/controller_concerns/payload_verification.rb +25 -0
- data/lib/shopify_app/controller_concerns/redirect_for_embedded.rb +36 -0
- data/lib/shopify_app/controller_concerns/sanitized_params.rb +36 -0
- data/lib/shopify_app/controller_concerns/webhook_verification.rb +3 -18
- data/lib/shopify_app/engine.rb +26 -11
- data/lib/shopify_app/errors.rb +34 -0
- data/lib/shopify_app/jobs/scripttags_manager_job.rb +2 -2
- data/lib/shopify_app/jobs/webhooks_manager_job.rb +4 -5
- data/lib/shopify_app/managers/scripttags_manager.rb +12 -6
- data/lib/shopify_app/managers/webhooks_manager.rb +62 -42
- data/lib/shopify_app/middleware/jwt_middleware.rb +6 -3
- data/lib/shopify_app/session/in_memory_session_store.rb +2 -3
- data/lib/shopify_app/session/in_memory_shop_session_store.rb +10 -7
- data/lib/shopify_app/session/in_memory_user_session_store.rb +10 -7
- data/lib/shopify_app/session/jwt.rb +19 -16
- data/lib/shopify_app/session/null_user_session_store.rb +2 -1
- data/lib/shopify_app/session/session_repository.rb +40 -2
- data/lib/shopify_app/session/session_storage.rb +4 -6
- data/lib/shopify_app/session/shop_session_storage.rb +6 -6
- data/lib/shopify_app/session/shop_session_storage_with_scopes.rb +57 -0
- data/lib/shopify_app/session/user_session_storage.rb +20 -7
- data/lib/shopify_app/session/user_session_storage_with_scopes.rb +71 -0
- data/lib/shopify_app/test_helpers/all.rb +2 -1
- data/lib/shopify_app/test_helpers/webhook_verification_helper.rb +4 -3
- data/lib/shopify_app/utils.rb +14 -7
- data/lib/shopify_app/version.rb +2 -1
- data/lib/shopify_app.rb +52 -29
- data/package.json +7 -8
- data/service.yml +1 -5
- data/shopify_app.gemspec +22 -20
- data/translation.yml +1 -1
- data/yarn.lock +2173 -2206
- metadata +110 -56
- data/.github/ISSUE_TEMPLATE.md +0 -14
- data/.github/probots.yml +0 -2
- data/.travis.yml +0 -28
- data/config/locales/hi.yml +0 -23
- data/config/locales/ms.yml +0 -22
- data/docs/install-on-dev-shop.png +0 -0
- data/docs/test-your-app.png +0 -0
- data/lib/generators/shopify_app/install/templates/omniauth.rb +0 -3
- data/lib/generators/shopify_app/install/templates/shopify_provider.rb +0 -20
- data/lib/generators/shopify_app/install/templates/user_agent.rb +0 -6
- data/lib/shopify_app/middleware/same_site_cookie_middleware.rb +0 -34
- data/package-lock.json +0 -7245
metadata
CHANGED
@@ -1,101 +1,115 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shopify_app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 20.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activeresource
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: browser_sniffer
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
31
|
- - "~>"
|
18
32
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
33
|
+
version: '2.0'
|
20
34
|
type: :runtime
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
38
|
- - "~>"
|
25
39
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
40
|
+
version: '2.0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
42
|
+
name: jwt
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
|
-
- - "
|
45
|
+
- - ">="
|
32
46
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
47
|
+
version: 2.2.3
|
34
48
|
type: :runtime
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
|
-
- - "
|
52
|
+
- - ">="
|
39
53
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
54
|
+
version: 2.2.3
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
56
|
+
name: rails
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
|
-
- - "
|
59
|
+
- - ">"
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
61
|
+
version: 5.2.1
|
48
62
|
type: :runtime
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
|
-
- - "
|
66
|
+
- - ">"
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
68
|
+
version: 5.2.1
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
70
|
+
name: redirect_safely
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
73
|
- - "~>"
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
75
|
+
version: '1.0'
|
62
76
|
type: :runtime
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
80
|
- - "~>"
|
67
81
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
82
|
+
version: '1.0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
84
|
+
name: shopify_api
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
87
|
- - "~>"
|
74
88
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
89
|
+
version: '11.1'
|
76
90
|
type: :runtime
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
94
|
- - "~>"
|
81
95
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
96
|
+
version: '11.1'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
98
|
+
name: sprockets-rails
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
|
-
- - "
|
101
|
+
- - ">="
|
88
102
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
103
|
+
version: 2.0.0
|
90
104
|
type: :runtime
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
|
-
- - "
|
108
|
+
- - ">="
|
95
109
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
110
|
+
version: 2.0.0
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
112
|
+
name: byebug
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
115
|
- - ">="
|
@@ -109,7 +123,7 @@ dependencies:
|
|
109
123
|
- !ruby/object:Gem::Version
|
110
124
|
version: '0'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
126
|
+
name: minitest
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
114
128
|
requirements:
|
115
129
|
- - ">="
|
@@ -123,7 +137,7 @@ dependencies:
|
|
123
137
|
- !ruby/object:Gem::Version
|
124
138
|
version: '0'
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
140
|
+
name: mocha
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
128
142
|
requirements:
|
129
143
|
- - ">="
|
@@ -137,7 +151,7 @@ dependencies:
|
|
137
151
|
- !ruby/object:Gem::Version
|
138
152
|
version: '0'
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
|
-
name: pry
|
154
|
+
name: pry
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
142
156
|
requirements:
|
143
157
|
- - ">="
|
@@ -151,7 +165,7 @@ dependencies:
|
|
151
165
|
- !ruby/object:Gem::Version
|
152
166
|
version: '0'
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
|
-
name: pry-
|
168
|
+
name: pry-nav
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
156
170
|
requirements:
|
157
171
|
- - ">="
|
@@ -165,7 +179,7 @@ dependencies:
|
|
165
179
|
- !ruby/object:Gem::Version
|
166
180
|
version: '0'
|
167
181
|
- !ruby/object:Gem::Dependency
|
168
|
-
name:
|
182
|
+
name: pry-stack_explorer
|
169
183
|
requirement: !ruby/object:Gem::Requirement
|
170
184
|
requirements:
|
171
185
|
- - ">="
|
@@ -179,21 +193,21 @@ dependencies:
|
|
179
193
|
- !ruby/object:Gem::Version
|
180
194
|
version: '0'
|
181
195
|
- !ruby/object:Gem::Dependency
|
182
|
-
name:
|
196
|
+
name: rake
|
183
197
|
requirement: !ruby/object:Gem::Requirement
|
184
198
|
requirements:
|
185
|
-
- - "
|
199
|
+
- - ">="
|
186
200
|
- !ruby/object:Gem::Version
|
187
|
-
version: '
|
201
|
+
version: '0'
|
188
202
|
type: :development
|
189
203
|
prerelease: false
|
190
204
|
version_requirements: !ruby/object:Gem::Requirement
|
191
205
|
requirements:
|
192
|
-
- - "
|
206
|
+
- - ">="
|
193
207
|
- !ruby/object:Gem::Version
|
194
|
-
version: '
|
208
|
+
version: '0'
|
195
209
|
- !ruby/object:Gem::Dependency
|
196
|
-
name:
|
210
|
+
name: rb-readline
|
197
211
|
requirement: !ruby/object:Gem::Requirement
|
198
212
|
requirements:
|
199
213
|
- - ">="
|
@@ -207,19 +221,19 @@ dependencies:
|
|
207
221
|
- !ruby/object:Gem::Version
|
208
222
|
version: '0'
|
209
223
|
- !ruby/object:Gem::Dependency
|
210
|
-
name:
|
224
|
+
name: sqlite3
|
211
225
|
requirement: !ruby/object:Gem::Requirement
|
212
226
|
requirements:
|
213
|
-
- - "
|
227
|
+
- - "~>"
|
214
228
|
- !ruby/object:Gem::Version
|
215
|
-
version: '
|
229
|
+
version: '1.4'
|
216
230
|
type: :development
|
217
231
|
prerelease: false
|
218
232
|
version_requirements: !ruby/object:Gem::Requirement
|
219
233
|
requirements:
|
220
|
-
- - "
|
234
|
+
- - "~>"
|
221
235
|
- !ruby/object:Gem::Version
|
222
|
-
version: '
|
236
|
+
version: '1.4'
|
223
237
|
- !ruby/object:Gem::Dependency
|
224
238
|
name: webmock
|
225
239
|
requirement: !ruby/object:Gem::Requirement
|
@@ -242,22 +256,37 @@ extra_rdoc_files: []
|
|
242
256
|
files:
|
243
257
|
- ".babelrc"
|
244
258
|
- ".github/CODEOWNERS"
|
245
|
-
- ".github/ISSUE_TEMPLATE.md"
|
246
|
-
- ".github/
|
259
|
+
- ".github/ISSUE_TEMPLATE/bug-report.md"
|
260
|
+
- ".github/ISSUE_TEMPLATE/config.yml"
|
261
|
+
- ".github/ISSUE_TEMPLATE/feature-request.md"
|
262
|
+
- ".github/PULL_REQUEST_TEMPLATE.md"
|
263
|
+
- ".github/workflows/build.yml"
|
264
|
+
- ".github/workflows/cla.yml"
|
265
|
+
- ".github/workflows/close-waiting-for-response-issues.yml"
|
266
|
+
- ".github/workflows/release.yml"
|
267
|
+
- ".github/workflows/remove-labels-on-activity.yml"
|
268
|
+
- ".github/workflows/rubocop.yml"
|
269
|
+
- ".github/workflows/stale.yml"
|
247
270
|
- ".gitignore"
|
248
271
|
- ".nvmrc"
|
249
272
|
- ".rubocop.yml"
|
250
273
|
- ".ruby-version"
|
251
|
-
- ".travis.yml"
|
252
274
|
- CHANGELOG.md
|
275
|
+
- CONTRIBUTING.md
|
253
276
|
- Gemfile
|
277
|
+
- Gemfile.lock
|
254
278
|
- LICENSE
|
255
279
|
- README.md
|
256
280
|
- Rakefile
|
281
|
+
- SECURITY.md
|
257
282
|
- app/assets/images/storage_access.svg
|
283
|
+
- app/assets/javascripts/shopify_app/app_bridge_3.1.1.js
|
284
|
+
- app/assets/javascripts/shopify_app/app_bridge_redirect.js
|
285
|
+
- app/assets/javascripts/shopify_app/app_bridge_utils_3.1.1.js
|
258
286
|
- app/assets/javascripts/shopify_app/enable_cookies.js
|
259
287
|
- app/assets/javascripts/shopify_app/itp_helper.js
|
260
288
|
- app/assets/javascripts/shopify_app/partition_cookies.js
|
289
|
+
- app/assets/javascripts/shopify_app/post_redirect.js
|
261
290
|
- app/assets/javascripts/shopify_app/redirect.js
|
262
291
|
- app/assets/javascripts/shopify_app/request_storage_access.js
|
263
292
|
- app/assets/javascripts/shopify_app/storage_access.js
|
@@ -265,6 +294,9 @@ files:
|
|
265
294
|
- app/assets/javascripts/shopify_app/top_level.js
|
266
295
|
- app/assets/javascripts/shopify_app/top_level_interaction.js
|
267
296
|
- app/controllers/concerns/shopify_app/authenticated.rb
|
297
|
+
- app/controllers/concerns/shopify_app/ensure_authenticated_links.rb
|
298
|
+
- app/controllers/concerns/shopify_app/require_known_shop.rb
|
299
|
+
- app/controllers/concerns/shopify_app/shop_access_scopes_verification.rb
|
268
300
|
- app/controllers/shopify_app/authenticated_controller.rb
|
269
301
|
- app/controllers/shopify_app/callback_controller.rb
|
270
302
|
- app/controllers/shopify_app/extension_verification_controller.rb
|
@@ -273,12 +305,14 @@ files:
|
|
273
305
|
- app/views/shopify_app/partials/_button_styles.html.erb
|
274
306
|
- app/views/shopify_app/partials/_card_styles.html.erb
|
275
307
|
- app/views/shopify_app/partials/_empty_state_styles.html.erb
|
308
|
+
- app/views/shopify_app/partials/_form_styles.html.erb
|
276
309
|
- app/views/shopify_app/partials/_layout_styles.html.erb
|
277
310
|
- app/views/shopify_app/partials/_typography_styles.html.erb
|
278
311
|
- app/views/shopify_app/sessions/enable_cookies.html.erb
|
279
312
|
- app/views/shopify_app/sessions/new.html.erb
|
280
313
|
- app/views/shopify_app/sessions/request_storage_access.html.erb
|
281
314
|
- app/views/shopify_app/sessions/top_level_interaction.html.erb
|
315
|
+
- app/views/shopify_app/shared/post_redirect_to_auth_shopify.html.erb
|
282
316
|
- app/views/shopify_app/shared/redirect.html.erb
|
283
317
|
- config/locales/cs.yml
|
284
318
|
- config/locales/da.yml
|
@@ -287,11 +321,9 @@ files:
|
|
287
321
|
- config/locales/es.yml
|
288
322
|
- config/locales/fi.yml
|
289
323
|
- config/locales/fr.yml
|
290
|
-
- config/locales/hi.yml
|
291
324
|
- config/locales/it.yml
|
292
325
|
- config/locales/ja.yml
|
293
326
|
- config/locales/ko.yml
|
294
|
-
- config/locales/ms.yml
|
295
327
|
- config/locales/nb.yml
|
296
328
|
- config/locales/nl.yml
|
297
329
|
- config/locales/pl.yml
|
@@ -300,14 +332,23 @@ files:
|
|
300
332
|
- config/locales/sv.yml
|
301
333
|
- config/locales/th.yml
|
302
334
|
- config/locales/tr.yml
|
335
|
+
- config/locales/vi.yml
|
303
336
|
- config/locales/zh-CN.yml
|
304
337
|
- config/locales/zh-TW.yml
|
305
338
|
- config/routes.rb
|
306
339
|
- docs/Quickstart.md
|
307
340
|
- docs/Releasing.md
|
308
341
|
- docs/Troubleshooting.md
|
309
|
-
- docs/
|
310
|
-
- docs/
|
342
|
+
- docs/Upgrading.md
|
343
|
+
- docs/shopify_app/authentication.md
|
344
|
+
- docs/shopify_app/content-security-policy.md
|
345
|
+
- docs/shopify_app/engine.md
|
346
|
+
- docs/shopify_app/generators.md
|
347
|
+
- docs/shopify_app/handling-access-scopes-changes.md
|
348
|
+
- docs/shopify_app/script-tags.md
|
349
|
+
- docs/shopify_app/session-repository.md
|
350
|
+
- docs/shopify_app/testing.md
|
351
|
+
- docs/shopify_app/webhooks.md
|
311
352
|
- images/app-proxy-screenshot.png
|
312
353
|
- karma.conf.js
|
313
354
|
- lib/generators/shopify_app/add_after_authenticate_job/add_after_authenticate_job_generator.rb
|
@@ -326,47 +367,59 @@ files:
|
|
326
367
|
- lib/generators/shopify_app/home_controller/home_controller_generator.rb
|
327
368
|
- lib/generators/shopify_app/home_controller/templates/home_controller.rb
|
328
369
|
- lib/generators/shopify_app/home_controller/templates/index.html.erb
|
370
|
+
- lib/generators/shopify_app/home_controller/templates/unauthenticated_home_controller.rb
|
329
371
|
- lib/generators/shopify_app/install/install_generator.rb
|
330
372
|
- lib/generators/shopify_app/install/templates/_flash_messages.html.erb
|
331
373
|
- lib/generators/shopify_app/install/templates/embedded_app.html.erb
|
332
374
|
- lib/generators/shopify_app/install/templates/flash_messages.js
|
333
|
-
- lib/generators/shopify_app/install/templates/omniauth.rb
|
334
375
|
- lib/generators/shopify_app/install/templates/session_store.rb
|
335
376
|
- lib/generators/shopify_app/install/templates/shopify_app.js
|
336
377
|
- lib/generators/shopify_app/install/templates/shopify_app.rb.tt
|
378
|
+
- lib/generators/shopify_app/install/templates/shopify_app_importmap.js
|
337
379
|
- lib/generators/shopify_app/install/templates/shopify_app_index.js
|
338
|
-
- lib/generators/shopify_app/
|
339
|
-
- lib/generators/shopify_app/
|
380
|
+
- lib/generators/shopify_app/products_controller/products_controller_generator.rb
|
381
|
+
- lib/generators/shopify_app/products_controller/templates/products_controller.rb
|
340
382
|
- lib/generators/shopify_app/rotate_shopify_token_job/rotate_shopify_token_job_generator.rb
|
341
383
|
- lib/generators/shopify_app/rotate_shopify_token_job/templates/rotate_shopify_token.rake
|
342
384
|
- lib/generators/shopify_app/rotate_shopify_token_job/templates/rotate_shopify_token_job.rb
|
343
385
|
- lib/generators/shopify_app/routes/routes_generator.rb
|
344
386
|
- lib/generators/shopify_app/routes/templates/routes.rb
|
345
387
|
- lib/generators/shopify_app/shop_model/shop_model_generator.rb
|
388
|
+
- lib/generators/shopify_app/shop_model/templates/db/migrate/add_shop_access_scopes_column.erb
|
346
389
|
- lib/generators/shopify_app/shop_model/templates/db/migrate/create_shops.erb
|
347
390
|
- lib/generators/shopify_app/shop_model/templates/shop.rb
|
348
391
|
- lib/generators/shopify_app/shop_model/templates/shops.yml
|
349
392
|
- lib/generators/shopify_app/shopify_app_generator.rb
|
393
|
+
- lib/generators/shopify_app/user_model/templates/db/migrate/add_user_access_scopes_column.erb
|
350
394
|
- lib/generators/shopify_app/user_model/templates/db/migrate/create_users.erb
|
351
395
|
- lib/generators/shopify_app/user_model/templates/user.rb
|
352
396
|
- lib/generators/shopify_app/user_model/templates/users.yml
|
353
397
|
- lib/generators/shopify_app/user_model/user_model_generator.rb
|
354
398
|
- lib/generators/shopify_app/views/views_generator.rb
|
355
399
|
- lib/shopify_app.rb
|
400
|
+
- lib/shopify_app/access_scopes/noop_strategy.rb
|
401
|
+
- lib/shopify_app/access_scopes/shop_strategy.rb
|
402
|
+
- lib/shopify_app/access_scopes/user_strategy.rb
|
356
403
|
- lib/shopify_app/configuration.rb
|
357
404
|
- lib/shopify_app/controller_concerns/app_proxy_verification.rb
|
405
|
+
- lib/shopify_app/controller_concerns/csrf_protection.rb
|
358
406
|
- lib/shopify_app/controller_concerns/embedded_app.rb
|
407
|
+
- lib/shopify_app/controller_concerns/ensure_billing.rb
|
408
|
+
- lib/shopify_app/controller_concerns/frame_ancestors.rb
|
359
409
|
- lib/shopify_app/controller_concerns/itp.rb
|
360
410
|
- lib/shopify_app/controller_concerns/localization.rb
|
361
411
|
- lib/shopify_app/controller_concerns/login_protection.rb
|
412
|
+
- lib/shopify_app/controller_concerns/payload_verification.rb
|
413
|
+
- lib/shopify_app/controller_concerns/redirect_for_embedded.rb
|
414
|
+
- lib/shopify_app/controller_concerns/sanitized_params.rb
|
362
415
|
- lib/shopify_app/controller_concerns/webhook_verification.rb
|
363
416
|
- lib/shopify_app/engine.rb
|
417
|
+
- lib/shopify_app/errors.rb
|
364
418
|
- lib/shopify_app/jobs/scripttags_manager_job.rb
|
365
419
|
- lib/shopify_app/jobs/webhooks_manager_job.rb
|
366
420
|
- lib/shopify_app/managers/scripttags_manager.rb
|
367
421
|
- lib/shopify_app/managers/webhooks_manager.rb
|
368
422
|
- lib/shopify_app/middleware/jwt_middleware.rb
|
369
|
-
- lib/shopify_app/middleware/same_site_cookie_middleware.rb
|
370
423
|
- lib/shopify_app/session/in_memory_session_store.rb
|
371
424
|
- lib/shopify_app/session/in_memory_shop_session_store.rb
|
372
425
|
- lib/shopify_app/session/in_memory_user_session_store.rb
|
@@ -375,12 +428,13 @@ files:
|
|
375
428
|
- lib/shopify_app/session/session_repository.rb
|
376
429
|
- lib/shopify_app/session/session_storage.rb
|
377
430
|
- lib/shopify_app/session/shop_session_storage.rb
|
431
|
+
- lib/shopify_app/session/shop_session_storage_with_scopes.rb
|
378
432
|
- lib/shopify_app/session/user_session_storage.rb
|
433
|
+
- lib/shopify_app/session/user_session_storage_with_scopes.rb
|
379
434
|
- lib/shopify_app/test_helpers/all.rb
|
380
435
|
- lib/shopify_app/test_helpers/webhook_verification_helper.rb
|
381
436
|
- lib/shopify_app/utils.rb
|
382
437
|
- lib/shopify_app/version.rb
|
383
|
-
- package-lock.json
|
384
438
|
- package.json
|
385
439
|
- service.yml
|
386
440
|
- shipit.rubygems.yml
|
@@ -400,14 +454,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
400
454
|
requirements:
|
401
455
|
- - ">="
|
402
456
|
- !ruby/object:Gem::Version
|
403
|
-
version: '2.
|
457
|
+
version: '2.7'
|
404
458
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
405
459
|
requirements:
|
406
460
|
- - ">="
|
407
461
|
- !ruby/object:Gem::Version
|
408
462
|
version: '0'
|
409
463
|
requirements: []
|
410
|
-
rubygems_version: 3.
|
464
|
+
rubygems_version: 3.3.3
|
411
465
|
signing_key:
|
412
466
|
specification_version: 4
|
413
467
|
summary: This gem is used to get quickly started with the Shopify API
|
data/.github/ISSUE_TEMPLATE.md
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
Submitting Issues
|
2
|
-
-----------------
|
3
|
-
|
4
|
-
Please open an issue here if you encounter a specific bug with this gem or the generators
|
5
|
-
|
6
|
-
General questions about the Shopify API should be posted on the [Shopify forums](https://ecommerce.shopify.com/c/shopify-apis-and-technology).
|
7
|
-
|
8
|
-
|
9
|
-
Authentication Issues
|
10
|
-
---------------------
|
11
|
-
|
12
|
-
A great deal of the issues surrounding this repo are around authenticating (installing) the generated app with Shopify.
|
13
|
-
|
14
|
-
If you are experiencing issues with your app authenticating/installing the best way to get help fast is to create a repo with the minimal amount of code to demonstrate the issue and a clearly documented set of steps you took to arrive there. This will help us solve your problem quicker since we won't need to spend any time figuring out how to reproduce the bug. Please also include your operating system and browser.
|
data/.github/probots.yml
DELETED
data/.travis.yml
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
sudo: required
|
2
|
-
dist: trusty
|
3
|
-
addons:
|
4
|
-
chrome: stable
|
5
|
-
before_script:
|
6
|
-
- "sudo chown root /opt/google/chrome/chrome-sandbox"
|
7
|
-
- "sudo chmod 4755 /opt/google/chrome/chrome-sandbox"
|
8
|
-
language: ruby
|
9
|
-
cache:
|
10
|
-
bundler: true
|
11
|
-
directories:
|
12
|
-
- node_modules
|
13
|
-
yarn: true
|
14
|
-
|
15
|
-
rvm:
|
16
|
-
- 2.4
|
17
|
-
- 2.5
|
18
|
-
- 2.6
|
19
|
-
- 2.7
|
20
|
-
|
21
|
-
install:
|
22
|
-
- bundle install
|
23
|
-
- nvm install node
|
24
|
-
- yarn
|
25
|
-
|
26
|
-
script:
|
27
|
-
- yarn test
|
28
|
-
- bundle exec rake test
|
data/config/locales/hi.yml
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
---
|
2
|
-
hi:
|
3
|
-
logged_out: सफलतापूर्वक लॉग आउट कर दिया
|
4
|
-
could_not_log_in: Shopify स्टोर में लॉग इन नहीं किया जा सका
|
5
|
-
invalid_shop_url: अमान्य शॉप डोमेन
|
6
|
-
enable_cookies_heading: "%{app} के कुकीज़ सक्षम करें"
|
7
|
-
enable_cookies_body: आपको %{app} का उपयोग Shopify में करने के लिए इस ब्राउज़र में
|
8
|
-
कुकीज़ मैन्युअल रूप से सक्षम करने चाहिए.
|
9
|
-
enable_cookies_footer: कुकीज़ अस्थायी रूप से आपकी वरीयताएं और व्यक्तिगत जानकारी स्टोर
|
10
|
-
कर ऐप को आपको प्रमाणित करने देते हैं. इनकी समय-सीमा 30 दिनों बाद समाप्त हो जाती
|
11
|
-
है.
|
12
|
-
enable_cookies_action: कुकीज़ को सक्षम करें
|
13
|
-
top_level_interaction_heading: आपके ब्राउज़र को %{app} प्रमाणित करने की आवश्यकता
|
14
|
-
है
|
15
|
-
top_level_interaction_body: आपके ब्राउज़र को %{app} जैसे ऐप की ज़रूरत होती है, जो
|
16
|
-
Shopify द्वारा आपके लिए उसे खोलने से पहले कुकीज़ पर पहुंचने करने की अनुमति मांगे.
|
17
|
-
top_level_interaction_action: जारी रखें
|
18
|
-
request_storage_access_heading: "%{app} को कुकीज़ पर पहुंच करने की आवश्यकता है"
|
19
|
-
request_storage_access_body: यह आपकी व्यक्तिगत जानकारी अस्थायी रूप से स्टोर कर ऐप
|
20
|
-
को आपको प्रमाणित करने देता है. जारी रखें पर क्लिक करें और कुकीज़ को ऐप उपयोग करने
|
21
|
-
की अनुमति दें.
|
22
|
-
request_storage_access_footer: कुकीज़ की समय-सीमा 30 दिनों बाद समाप्त हो जाती है.
|
23
|
-
request_storage_access_action: जारी रखें
|
data/config/locales/ms.yml
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
---
|
2
|
-
ms:
|
3
|
-
logged_out: Berjaya log keluar
|
4
|
-
could_not_log_in: Tidak dapat log masuk ke kedai Shopify
|
5
|
-
invalid_shop_url: Domain kedai tidak sah
|
6
|
-
enable_cookies_heading: Dayakan kuki dari %{app}
|
7
|
-
enable_cookies_body: Anda mesti mengaktifkan kuki secara manual dalam pelayar ini
|
8
|
-
untuk %{app} digunakan dalam Shopify.
|
9
|
-
enable_cookies_footer: Kuki membenarkan aplikasi mengesahkan anda dengan menyimpan
|
10
|
-
keutamaan dan maklumat peribadi anda buat sementara waktu. Ia tamat tempoh selepas
|
11
|
-
30 hari.
|
12
|
-
enable_cookies_action: Dayakan kuki
|
13
|
-
top_level_interaction_heading: Pelayar anda perlu mengesahkan %{app}
|
14
|
-
top_level_interaction_body: Pelayar anda memerlukan aplikasi seperti %{app} untuk
|
15
|
-
meminta anda akses kepada kuki sebelum Shopify boleh membukanya untuk anda.
|
16
|
-
top_level_interaction_action: Teruskan
|
17
|
-
request_storage_access_heading: "%{app} memerlukan akses kepada kuki"
|
18
|
-
request_storage_access_body: Ini membolehkan aplikasi mengesahkan anda dengan menyimpan
|
19
|
-
maklumat peribadi anda buat sementara waktu. Klik teruskan dan benarkan kuki untuk
|
20
|
-
menggunakan aplikasi.
|
21
|
-
request_storage_access_footer: Kuki akan tamat tempoh selepas 30 hari.
|
22
|
-
request_storage_access_action: Teruskan
|
Binary file
|
data/docs/test-your-app.png
DELETED
Binary file
|
@@ -1,20 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
provider :shopify,
|
4
|
-
ShopifyApp.configuration.api_key,
|
5
|
-
ShopifyApp.configuration.secret,
|
6
|
-
scope: ShopifyApp.configuration.scope,
|
7
|
-
setup: lambda { |env|
|
8
|
-
strategy = env['omniauth.strategy']
|
9
|
-
|
10
|
-
shopify_auth_params = strategy.session['shopify.omniauth_params']&.with_indifferent_access
|
11
|
-
shop = if shopify_auth_params.present?
|
12
|
-
"https://#{shopify_auth_params[:shop]}"
|
13
|
-
else
|
14
|
-
''
|
15
|
-
end
|
16
|
-
|
17
|
-
strategy.options[:client_options][:site] = shop
|
18
|
-
strategy.options[:old_client_secret] = ShopifyApp.configuration.old_secret
|
19
|
-
strategy.options[:per_user_permissions] = strategy.session[:user_tokens]
|
20
|
-
}
|
@@ -1,34 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
module ShopifyApp
|
3
|
-
class SameSiteCookieMiddleware
|
4
|
-
COOKIE_SEPARATOR = "\n"
|
5
|
-
|
6
|
-
def initialize(app)
|
7
|
-
@app = app
|
8
|
-
end
|
9
|
-
|
10
|
-
def call(env)
|
11
|
-
status, headers, body = @app.call(env)
|
12
|
-
user_agent = env['HTTP_USER_AGENT']
|
13
|
-
|
14
|
-
if headers && headers['Set-Cookie'] &&
|
15
|
-
BrowserSniffer.new(user_agent).same_site_none_compatible? &&
|
16
|
-
ShopifyApp.configuration.enable_same_site_none &&
|
17
|
-
Rack::Request.new(env).ssl?
|
18
|
-
|
19
|
-
set_cookies = headers['Set-Cookie']
|
20
|
-
.split(COOKIE_SEPARATOR)
|
21
|
-
.compact
|
22
|
-
.map do |cookie|
|
23
|
-
cookie << '; Secure' unless cookie =~ /;\s*secure/i
|
24
|
-
cookie << '; SameSite=None' unless cookie =~ /;\s*samesite=/i
|
25
|
-
cookie
|
26
|
-
end
|
27
|
-
|
28
|
-
headers['Set-Cookie'] = set_cookies.join(COOKIE_SEPARATOR)
|
29
|
-
end
|
30
|
-
|
31
|
-
[status, headers, body]
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|