shopify_app 13.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. checksums.yaml +7 -0
  2. data/.babelrc +5 -0
  3. data/.github/CODEOWNERS +1 -0
  4. data/.github/ISSUE_TEMPLATE.md +14 -0
  5. data/.github/PULL_REQUEST_TEMPLATE.md +6 -0
  6. data/.github/probots.yml +2 -0
  7. data/.github/workflows/rubocop.yml +28 -0
  8. data/.gitignore +16 -0
  9. data/.nvmrc +1 -0
  10. data/.rubocop.yml +17 -0
  11. data/.ruby-version +1 -0
  12. data/.travis.yml +28 -0
  13. data/CHANGELOG.md +505 -0
  14. data/Gemfile +11 -0
  15. data/LICENSE +19 -0
  16. data/README.md +620 -0
  17. data/Rakefile +7 -0
  18. data/SECURITY.md +59 -0
  19. data/app/assets/images/storage_access.svg +2 -0
  20. data/app/assets/javascripts/shopify_app/enable_cookies.js +3 -0
  21. data/app/assets/javascripts/shopify_app/itp_helper.js +40 -0
  22. data/app/assets/javascripts/shopify_app/partition_cookies.js +8 -0
  23. data/app/assets/javascripts/shopify_app/redirect.js +33 -0
  24. data/app/assets/javascripts/shopify_app/request_storage_access.js +3 -0
  25. data/app/assets/javascripts/shopify_app/storage_access.js +153 -0
  26. data/app/assets/javascripts/shopify_app/storage_access_redirect.js +17 -0
  27. data/app/assets/javascripts/shopify_app/top_level.js +2 -0
  28. data/app/assets/javascripts/shopify_app/top_level_interaction.js +11 -0
  29. data/app/controllers/concerns/shopify_app/authenticated.rb +16 -0
  30. data/app/controllers/concerns/shopify_app/require_known_shop.rb +39 -0
  31. data/app/controllers/shopify_app/authenticated_controller.rb +8 -0
  32. data/app/controllers/shopify_app/callback_controller.rb +140 -0
  33. data/app/controllers/shopify_app/extension_verification_controller.rb +15 -0
  34. data/app/controllers/shopify_app/sessions_controller.rb +184 -0
  35. data/app/controllers/shopify_app/webhooks_controller.rb +37 -0
  36. data/app/views/shopify_app/partials/_button_styles.html.erb +104 -0
  37. data/app/views/shopify_app/partials/_card_styles.html.erb +33 -0
  38. data/app/views/shopify_app/partials/_empty_state_styles.html.erb +129 -0
  39. data/app/views/shopify_app/partials/_layout_styles.html.erb +167 -0
  40. data/app/views/shopify_app/partials/_typography_styles.html.erb +35 -0
  41. data/app/views/shopify_app/sessions/enable_cookies.html.erb +75 -0
  42. data/app/views/shopify_app/sessions/new.html.erb +123 -0
  43. data/app/views/shopify_app/sessions/request_storage_access.html.erb +68 -0
  44. data/app/views/shopify_app/sessions/top_level_interaction.html.erb +64 -0
  45. data/app/views/shopify_app/shared/redirect.html.erb +23 -0
  46. data/config/locales/cs.yml +23 -0
  47. data/config/locales/da.yml +20 -0
  48. data/config/locales/de.yml +22 -0
  49. data/config/locales/en.yml +15 -0
  50. data/config/locales/es.yml +22 -0
  51. data/config/locales/fi.yml +20 -0
  52. data/config/locales/fr.yml +23 -0
  53. data/config/locales/hi.yml +23 -0
  54. data/config/locales/it.yml +21 -0
  55. data/config/locales/ja.yml +17 -0
  56. data/config/locales/ko.yml +19 -0
  57. data/config/locales/ms.yml +22 -0
  58. data/config/locales/nb.yml +21 -0
  59. data/config/locales/nl.yml +21 -0
  60. data/config/locales/pl.yml +21 -0
  61. data/config/locales/pt-BR.yml +21 -0
  62. data/config/locales/pt-PT.yml +22 -0
  63. data/config/locales/sv.yml +21 -0
  64. data/config/locales/th.yml +20 -0
  65. data/config/locales/tr.yml +22 -0
  66. data/config/locales/zh-CN.yml +16 -0
  67. data/config/locales/zh-TW.yml +16 -0
  68. data/config/routes.rb +23 -0
  69. data/docs/Quickstart.md +93 -0
  70. data/docs/Releasing.md +18 -0
  71. data/docs/Troubleshooting.md +16 -0
  72. data/docs/install-on-dev-shop.png +0 -0
  73. data/docs/test-your-app.png +0 -0
  74. data/images/app-proxy-screenshot.png +0 -0
  75. data/karma.conf.js +44 -0
  76. data/lib/generators/shopify_app/add_after_authenticate_job/add_after_authenticate_job_generator.rb +47 -0
  77. data/lib/generators/shopify_app/add_after_authenticate_job/templates/after_authenticate_job.rb +11 -0
  78. data/lib/generators/shopify_app/add_marketing_activity_extension/add_marketing_activity_extension_generator.rb +40 -0
  79. data/lib/generators/shopify_app/add_marketing_activity_extension/templates/marketing_activities_controller.rb +62 -0
  80. data/lib/generators/shopify_app/add_webhook/add_webhook_generator.rb +69 -0
  81. data/lib/generators/shopify_app/add_webhook/templates/webhook_job.rb.tt +13 -0
  82. data/lib/generators/shopify_app/app_proxy_controller/app_proxy_controller_generator.rb +26 -0
  83. data/lib/generators/shopify_app/app_proxy_controller/templates/app_proxy_controller.rb +8 -0
  84. data/lib/generators/shopify_app/app_proxy_controller/templates/app_proxy_route.rb +11 -0
  85. data/lib/generators/shopify_app/app_proxy_controller/templates/index.html.erb +19 -0
  86. data/lib/generators/shopify_app/authenticated_controller/authenticated_controller_generator.rb +15 -0
  87. data/lib/generators/shopify_app/authenticated_controller/templates/authenticated_controller.rb +5 -0
  88. data/lib/generators/shopify_app/controllers/controllers_generator.rb +30 -0
  89. data/lib/generators/shopify_app/home_controller/home_controller_generator.rb +26 -0
  90. data/lib/generators/shopify_app/home_controller/templates/home_controller.rb +8 -0
  91. data/lib/generators/shopify_app/home_controller/templates/index.html.erb +21 -0
  92. data/lib/generators/shopify_app/install/install_generator.rb +83 -0
  93. data/lib/generators/shopify_app/install/templates/_flash_messages.html.erb +3 -0
  94. data/lib/generators/shopify_app/install/templates/embedded_app.html.erb +41 -0
  95. data/lib/generators/shopify_app/install/templates/flash_messages.js +24 -0
  96. data/lib/generators/shopify_app/install/templates/omniauth.rb +3 -0
  97. data/lib/generators/shopify_app/install/templates/session_store.rb +4 -0
  98. data/lib/generators/shopify_app/install/templates/shopify_app.js +15 -0
  99. data/lib/generators/shopify_app/install/templates/shopify_app.rb.tt +15 -0
  100. data/lib/generators/shopify_app/install/templates/shopify_app_index.js +2 -0
  101. data/lib/generators/shopify_app/install/templates/shopify_provider.rb +20 -0
  102. data/lib/generators/shopify_app/install/templates/user_agent.rb +6 -0
  103. data/lib/generators/shopify_app/rotate_shopify_token_job/rotate_shopify_token_job_generator.rb +16 -0
  104. data/lib/generators/shopify_app/rotate_shopify_token_job/templates/rotate_shopify_token.rake +17 -0
  105. data/lib/generators/shopify_app/rotate_shopify_token_job/templates/rotate_shopify_token_job.rb +42 -0
  106. data/lib/generators/shopify_app/routes/routes_generator.rb +32 -0
  107. data/lib/generators/shopify_app/routes/templates/routes.rb +12 -0
  108. data/lib/generators/shopify_app/shop_model/shop_model_generator.rb +43 -0
  109. data/lib/generators/shopify_app/shop_model/templates/db/migrate/create_shops.erb +15 -0
  110. data/lib/generators/shopify_app/shop_model/templates/shop.rb +8 -0
  111. data/lib/generators/shopify_app/shop_model/templates/shops.yml +3 -0
  112. data/lib/generators/shopify_app/shopify_app_generator.rb +18 -0
  113. data/lib/generators/shopify_app/user_model/templates/db/migrate/create_users.erb +16 -0
  114. data/lib/generators/shopify_app/user_model/templates/user.rb +8 -0
  115. data/lib/generators/shopify_app/user_model/templates/users.yml +4 -0
  116. data/lib/generators/shopify_app/user_model/user_model_generator.rb +43 -0
  117. data/lib/generators/shopify_app/views/views_generator.rb +30 -0
  118. data/lib/shopify_app.rb +61 -0
  119. data/lib/shopify_app/configuration.rb +94 -0
  120. data/lib/shopify_app/controller_concerns/app_proxy_verification.rb +38 -0
  121. data/lib/shopify_app/controller_concerns/csrf_protection.rb +15 -0
  122. data/lib/shopify_app/controller_concerns/embedded_app.rb +20 -0
  123. data/lib/shopify_app/controller_concerns/itp.rb +45 -0
  124. data/lib/shopify_app/controller_concerns/localization.rb +23 -0
  125. data/lib/shopify_app/controller_concerns/login_protection.rb +231 -0
  126. data/lib/shopify_app/controller_concerns/payload_verification.rb +24 -0
  127. data/lib/shopify_app/controller_concerns/webhook_verification.rb +23 -0
  128. data/lib/shopify_app/engine.rb +25 -0
  129. data/lib/shopify_app/jobs/scripttags_manager_job.rb +16 -0
  130. data/lib/shopify_app/jobs/webhooks_manager_job.rb +16 -0
  131. data/lib/shopify_app/managers/scripttags_manager.rb +78 -0
  132. data/lib/shopify_app/managers/webhooks_manager.rb +62 -0
  133. data/lib/shopify_app/middleware/jwt_middleware.rb +42 -0
  134. data/lib/shopify_app/middleware/same_site_cookie_middleware.rb +34 -0
  135. data/lib/shopify_app/session/in_memory_session_store.rb +31 -0
  136. data/lib/shopify_app/session/in_memory_shop_session_store.rb +14 -0
  137. data/lib/shopify_app/session/in_memory_user_session_store.rb +14 -0
  138. data/lib/shopify_app/session/jwt.rb +61 -0
  139. data/lib/shopify_app/session/null_user_session_store.rb +22 -0
  140. data/lib/shopify_app/session/session_repository.rb +56 -0
  141. data/lib/shopify_app/session/session_storage.rb +20 -0
  142. data/lib/shopify_app/session/shop_session_storage.rb +42 -0
  143. data/lib/shopify_app/session/user_session_storage.rb +42 -0
  144. data/lib/shopify_app/test_helpers/all.rb +2 -0
  145. data/lib/shopify_app/test_helpers/webhook_verification_helper.rb +17 -0
  146. data/lib/shopify_app/utils.rb +24 -0
  147. data/lib/shopify_app/version.rb +4 -0
  148. data/package-lock.json +7177 -0
  149. data/package.json +28 -0
  150. data/service.yml +7 -0
  151. data/shipit.rubygems.yml +4 -0
  152. data/shopify_app.gemspec +37 -0
  153. data/translation.yml +7 -0
  154. data/webpack.config.js +24 -0
  155. data/yarn.lock +5263 -0
  156. metadata +420 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 56264e18e59398228e56a0a26dc752989b527d7ce935f0375a872fd89c88b4b9
4
+ data.tar.gz: a9c8ff9c9828278f7fff6013a09ec6bf3ea8f4542c700c5fe57bf16e33ed1f68
5
+ SHA512:
6
+ metadata.gz: cbd3b18c84d6e69c01516f7b74927ba3d236cd17ad2d88a68cc1c93dfd1f8d20aa614507adf031625e088612001d71dbbb116bb267865b1924674d2a6f937e6f
7
+ data.tar.gz: 82b859132159cf85fb3af1607296b20aa040ca30515a6225fa3887ee938dd721f11be2939ea2d9179a448e80ae3d2e7316749bd237ee8344fa0cf1fe862d6a7b
@@ -0,0 +1,5 @@
1
+ {
2
+ "babel": {
3
+ "presets": ["shopify/web"]
4
+ }
5
+ }
@@ -0,0 +1 @@
1
+ * @shopify/platform-dev-tools-education
@@ -0,0 +1,14 @@
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.
@@ -0,0 +1,6 @@
1
+ Before submitting the PR, please consider if any of the following are needed:
2
+
3
+ - [ ] Update `CHANGELOG.md` if the changes would impact users
4
+ - [ ] Update `README.md`, if appropriate.
5
+ - [ ] Update any relevant pages in `docs/`, if necessary
6
+ - [ ] For security fixes, the [Disclosure Policy](https://github.com/Shopify/shopify_app/blob/master/SECURITY.md#disclosure-policy) must be followed.
@@ -0,0 +1,2 @@
1
+ enabled:
2
+ - cla
@@ -0,0 +1,28 @@
1
+ name: RuboCop
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ runs-on: ubuntu-latest
8
+
9
+ steps:
10
+ - uses: actions/checkout@v2
11
+ - name: Set up Ruby 2.7
12
+ uses: ruby/setup-ruby@v1
13
+ with:
14
+ ruby-version: 2.7
15
+ - name: Cache gems
16
+ uses: actions/cache@v1
17
+ with:
18
+ path: vendor/bundle
19
+ key: ${{ runner.os }}-rubocop-${{ hashFiles('**/Gemfile.lock') }}
20
+ restore-keys: |
21
+ ${{ runner.os }}-rubocop-
22
+ - name: Install gems
23
+ run: |
24
+ bundle config path vendor/bundle
25
+ bundle config set without 'default development test'
26
+ bundle install --jobs 4 --retry 3
27
+ - name: Run RuboCop
28
+ run: bundle exec rubocop --parallel
@@ -0,0 +1,16 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
5
+ .DS_Store
6
+ .yardoc
7
+ doc/
8
+ *.log
9
+ *.sqlite3
10
+ test/tmp/*
11
+ .idea
12
+ # ignore sprockets cache
13
+ /test/dummy/tmp/*
14
+ /node_modules/
15
+ .byebug_history
16
+
data/.nvmrc ADDED
@@ -0,0 +1 @@
1
+ 8.10.0
@@ -0,0 +1,17 @@
1
+ inherit_gem:
2
+ rubocop-shopify: rubocop.yml
3
+
4
+ AllCops:
5
+ TargetRubyVersion: 2.7
6
+ Exclude:
7
+ - 'test/tmp/**/*'
8
+ - 'vendor/bundle/**/*'
9
+
10
+ Style/MethodCallWithArgsParentheses:
11
+ Exclude:
12
+ - '**/Gemfile'
13
+
14
+ Style/ClassAndModuleChildren:
15
+ Exclude:
16
+ - 'test/**/*'
17
+
@@ -0,0 +1 @@
1
+ 2.5.0
@@ -0,0 +1,28 @@
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
@@ -0,0 +1,505 @@
1
+ 13.5.0
2
+ ------
3
+ * Add `signal_access_token_required` helper method for apps to indicate access token has expired and that a new one is required
4
+
5
+ 13.4.1
6
+ ------
7
+ * Fix the version checks for the dependency on `shopify_api` to allow all of v9.X
8
+
9
+ 13.4.0
10
+ ------
11
+ * Skip CSRF protection if a valid signed JWT token is present as we trust Shopify to be the only source that can sign it securely. [#994](https://github.com/Shopify/shopify_app/pull/994)
12
+
13
+ 13.3.0
14
+ ------
15
+ * Added Payload Verification module [#992](https://github.com/Shopify/shopify_app/pull/992)
16
+ * Add concern to check for valid shop domains in the unauthenticated controller
17
+
18
+ 13.2.0
19
+ ------
20
+ * Get current shop domain from JWT header
21
+ * Validate that the omniauth data matches the JWT data
22
+ * Persist the token information to the session store
23
+
24
+ 13.1.1
25
+ ------
26
+ * Update browser_sniffer to 1.2.2
27
+
28
+ 13.1.0
29
+ ------
30
+ * Adds the shop URL as a parameter when redirecting after the callback
31
+ * Bump minimum Ruby version to 2.4
32
+ * Bug fixes
33
+
34
+ 13.0.1
35
+ ------
36
+ * Small addition to WebhookJob to return if the shop is nil #952
37
+ * Added Rubocop to the Repo #948
38
+ * Added a WebhookVerification test helper #950
39
+ * Fix for deprecation warning while loading session storage at startup
40
+ * Changes that will allow future JWT authentication
41
+
42
+ 13.0.1
43
+ ------
44
+ * fix for deprecation warning while loading session storage at startup
45
+
46
+ 13.0.0
47
+ ------
48
+ + #887 Added concurrent user and shop session support (online/offline)
49
+ BREAKING, please see README for migration notes.
50
+
51
+ 12.0.7
52
+ ------
53
+ * Remove check for API_KEY in config that was throwing errors during install #919
54
+
55
+ 12.0.6
56
+ ------
57
+ * Adds changelog information and README updates for 8.4.0 #916
58
+
59
+ 12.0.5
60
+ ------
61
+ * Updating shopify_api gem to 9.0.1
62
+
63
+ 12.0.4
64
+ ------
65
+ * Reverts reverted PR (#895) #897
66
+
67
+ 12.0.3
68
+ ------
69
+ * Moves samesite middleware higher in the stack #898
70
+ * Fix issue where not redirecting user to granted storage page casues infinite loop #900
71
+
72
+ 12.0.2
73
+ ------
74
+ * Reverts "Fix for return_to in safari after enable_cookies/granted_storage_access" introduced in 12.0.1
75
+
76
+ 12.0.1
77
+ ------
78
+ * disable samesite cookie middleware in tests
79
+ * middleware compatibility for ruby 2.3
80
+ * samesite cookie fixes for javascript libraries
81
+ * change generators to add AppBridge instead of EASDK
82
+ * Fix for return_to in safari after enable_cookies/granted_storage_access
83
+
84
+ 12.0.0
85
+ -----
86
+ * Updating shopify_api gem to 9.0.0
87
+
88
+ 11.7.1
89
+ -----
90
+ * Fix to allow SessionStorage to be flexible on what model names that the are used for storing shop and user data
91
+
92
+ 11.7.0
93
+ -----
94
+ * Move ExtensionVerificationController from engine to app controllers, as being in the engine makes ActionController::Base get loaded before app initiates [#855](https://github.com/Shopify/shopify_app/pull/855)
95
+ * Add back per-user token support (added in 11.5.0, reverted in 11.5.1)
96
+ * If you have an override on the `self.store(auth_session)` method on your `SessionRepository` model, the method signature must be changed as according to this [change](https://github.com/Shopify/shopify_app/pull/856/files#diff-deaed2b262ec885f4e36de05621e41eaR18)
97
+
98
+ 11.6.0
99
+ -----
100
+ * Enable SameSite=None; Secure by default on all cookies for embedded apps [#851](https://github.com/Shopify/shopify_app/pull/851)
101
+ * Ensures compatibility of embedded apps with upcoming Chrome version 80 changes to cookie behaviour
102
+ * Configurable via `ShopifyApp.configuration.enable_same_site_none` (default true for embedded apps)
103
+
104
+ 11.5.1
105
+ -----
106
+ * Revert per-user token support temporarily
107
+
108
+ 11.5.0
109
+ -----
110
+ * Modularizes durable session storage
111
+ * Introduces per-user token support and user session management
112
+
113
+ 11.4.0
114
+ -----
115
+ * Remove `dotenv-rails` dependency. [#835](https://github.com/Shopify/shopify_app/pull/835)
116
+
117
+ 11.3.2
118
+ -----
119
+ * Fix hosts generator in Rails 5 [#823](https://github.com/Shopify/shopify_app/pull/823)
120
+
121
+ 11.3.1
122
+ -----
123
+ * Bump browser_sniffer version to 1.1.3 [#824](https://github.com/Shopify/shopify_app/pull/824)
124
+
125
+ 11.3.0
126
+ -----
127
+ * Update assets to be compatible with Rails 6 [#808](https://github.com/Shopify/shopify_app/pull/808)
128
+
129
+ 11.2.1
130
+ -----
131
+ * Adds ngrok whitelist in development [#802](https://github.com/Shopify/shopify_app/pull/802)
132
+
133
+ 11.2.0
134
+ -----
135
+
136
+ * Bump omniauth-shopify-oauth2 gem to v2.2.0
137
+
138
+ 11.1.0
139
+ -----
140
+
141
+ * Add Webmock and Pry as development dependencies
142
+ * Update install generator to leverage updates to ShopifyAPI::ApiVersion add in v8.0.0 of the shopify_api gem [#790](https://github.com/Shopify/shopify_app/pull/790)
143
+
144
+
145
+ 11.0.2
146
+ -----
147
+
148
+ * Lock shopify_api gem dependency to `~> 7.0` from `>= 7.0.0`.
149
+ * Remove flakey JS Tests
150
+ * bump sqlite3 development dependency to `~>1.4` from `~> 1.3.6`. [#789](https://github.com/Shopify/shopify_app/pull/789)
151
+
152
+ 11.0.1
153
+ -----
154
+
155
+ * Add dotenv-rails gem to install generator, so apps fetch credentials from `.env` by default: [#776](https://github.com/Shopify/shopify_app/pull/776)
156
+
157
+ 11.0.0
158
+ -----
159
+
160
+ * Rename `login_url` method to `login_url_with_optional_shop` to avoid ambiguity with Rails' route helper method of the
161
+ same name (see [#585](https://github.com/Shopify/shopify_app/pull/585)).
162
+
163
+ 10.0.0
164
+ -----
165
+
166
+ * Make sure OAuth-related redirects return user to originally requested URL once authenticated
167
+ * Add/update translations
168
+ * Update README to clarify nested routes
169
+ * Remove example app. Users should instead use the generators to scaffold an example app.
170
+ * Bump required Rails version to `> 5.2.1` to ensure `5.2.1.1` or greater is used. This ensures two things:
171
+ * Apps are not vulnerable to [CVE-2018-16476](https://nvd.nist.gov/vuln/detail/CVE-2018-16476)
172
+ * Webhook payloads, from Shopify for API version 2019-07, which are processed in ActiveJob background jobs (the
173
+ default behaviour of shopify_app's WebhooksController) are compatible, due to how ActiveJob versions prior to
174
+ 5.2.1.1 process GlobalIDs encoded as string in job parameters. This prevents the
175
+ [exceptions reported previously](https://github.com/Shopify/shopify_app/issues/600).
176
+
177
+ 9.0.4
178
+ -----
179
+
180
+ * Fix returning to a deep link after authentication [#746](https://github.com/Shopify/shopify_app/pull/746)
181
+
182
+ 9.0.3
183
+ -----
184
+
185
+ * Add `meta viewport` tags to fix mobile responsive problems
186
+ * Remove outdated, extraneous `yarn.lock` file (and rely on existing `package-lock.json` instead)
187
+ * Move inline js to a js asset file
188
+ * Minor documentation corrections
189
+
190
+ 9.0.2
191
+ -----
192
+
193
+ * Update browser_sniffer to fix unnecessary ITP flows in Shopify Mobile
194
+ * Add additional languages to translation.yml
195
+ * Minor documentation corrections
196
+
197
+ 9.0.1
198
+ -----
199
+
200
+ * Minor documentation corrections
201
+ * Handle `Webhook.all` returning `nil` and raising on `index_by`
202
+
203
+
204
+ 9.0.0
205
+ -----
206
+
207
+ * Breaking change: Api version support added see [migration guide](README.md#upgrading-from-86-to-900)
208
+
209
+ 8.6.1
210
+ -----
211
+
212
+ * Locked `shopify_api` gem to version < 7.0. 7.0 will have breaking changes that are incompatable with `shopify_app`
213
+
214
+ * Session storage validation for shopify_domain is now set to `case_sensitive: false`.
215
+
216
+ 8.6.0
217
+ -----
218
+
219
+ * Added an `Authenticated` concern to allow gem users to inherit from a custom `AuthenticatedController` instead of
220
+ `ShopifyApp::AuthenticatedController`
221
+
222
+ 8.5.1
223
+ -----
224
+
225
+ * Fixed a typo in RotateShopifyTokenJob
226
+
227
+ 8.5.0
228
+ -----
229
+ Added support for rotating Shopify access tokens:
230
+
231
+ * Added a generator shopify_app:rotate_shopify_token_job for generating the job to perform token rotation
232
+ * Extend Shopify app configuration to support a new and old secret token
233
+ * Extended webhook validation code to support validating against new and old secret tokens
234
+ * See the README for more details: https://github.com/Shopify/shopify_app#rotateshopifytokenjob
235
+
236
+ 8.4.2
237
+ -----
238
+ * Clear stale user session during auth callback
239
+
240
+ 8.4.1
241
+ -----
242
+ * Update README and Releasing.md
243
+ * Allow user agent to not be set
244
+ * Remove legacy EASDK examples
245
+ * Add .ruby-version file
246
+ * Clean up omniauth setup and fix examples
247
+ * Fix infinite redirect loops if users have disabled 3rd party cookies in their browser
248
+
249
+ 8.4.0
250
+ ----
251
+ * Fix embedded app session management in Safari 12.1
252
+ * Note that with this change we have extracted the callback action in its own controller. If you are relying on it, see the README for more details: https://github.com/Shopify/shopify_app#callback
253
+ * Shop names passed to OAuth are no longer case sensitive
254
+
255
+ 8.3.2
256
+ ----
257
+ * Removes `read_orders` from the default scopes provided upon app generation
258
+
259
+ 8.3.1
260
+ ----
261
+ * Adds the ability to customize the login URL through the initializer
262
+
263
+ 8.3.0
264
+ ----
265
+ * Fix embedded app session management in Safari 12
266
+ * Add support for translation platform
267
+
268
+ 8.2.6
269
+ ----
270
+ * Sanitize the shop query param to include `.myshopify.com` if no domain was provided
271
+
272
+ 8.2.5
273
+ ----
274
+ * fix iframe headers on session controller
275
+
276
+ 8.2.4
277
+ -----
278
+ * Add CSRF protection through `protect_from_forgery with: :exception` on `ShopifyApp::AuthenticatedController`
279
+
280
+ 8.2.3
281
+ -----
282
+ * Send head :forbidden instead of :unauthorized when AppProxyVerification fails
283
+
284
+ 8.2.2
285
+ -----
286
+ * Changes how the ESDK concern allows iframes. Fixes an issue with the first request for some people
287
+
288
+ 8.2.1
289
+ -----
290
+ * Bugfix: Don't logout shops from `login_again_if_different_shop` when Rails
291
+ params for a 'Shop' model are passed in [[#477]](https://github.com/Shopify/shopify_app/pull/477)
292
+
293
+ 8.2.0
294
+ -----
295
+ Known bug: Shop logged out when submitting a form for 'Shop' objects, fixed in 8.2.1 [[See #480 for details]](https://github.com/Shopify/shopify_app/issues/480)
296
+
297
+ * Add `webhook_jobs_namespace` config option. [[#463]](https://github.com/Shopify/shopify_app/pull/463)
298
+ * Updates login page styles to match the [Polaris](https://polaris.shopify.com/) design system. [[#474]](https://github.com/Shopify/shopify_app/pull/474)
299
+
300
+ 8.1.0
301
+ -----
302
+ Known bug: Shop logged out when submitting a form for 'Shop' objects, fixed in 8.2.1 [[See #480 for details]](https://github.com/Shopify/shopify_app/issues/480)
303
+
304
+ * Add support for per_user_authentication
305
+ * Pass the shop param in the session for authentication instead of a url param (prevents csrf). If you are upgrading from an older version of the gem you will need to update your omniauth.rb initializer file. Check the example app for what it what it should look like.
306
+
307
+ 8.0.0
308
+ -----
309
+ Known bug: Shop logged out when submitting a form for 'Shop' objects, fixed in 8.2.1 [[See #480 for details]](https://github.com/Shopify/shopify_app/issues/480)
310
+
311
+ * Removed the `shopify_session_repository` initializer. The SessionRepository is now configured through the main ShopifyApp configuration object and the generated initializer
312
+ * Moved InMemorySessionStore into the ShopifyApp namespace
313
+ * Remove ShopifySession concern. This module made the code internal to this engine harder to follow and we want to discourage over-writing the auth code now that we have generic hooks for all extra tasks during install.
314
+ * Changed engine controllers to subclass ActionController::Base to avoid any possible conflict with the parent application
315
+ * Removed the `ShopifyApp::Shop` concern and added its methods to `ShopifyApp::SessionStorage`. To update for this change just remove this concern anywhere it is being used in your application.
316
+ * Add `ShopifyApp::EmbeddedApp` controller concern which handles setting the required headers for the ESDK. Previously this was done by injecting configuration into applicaton.rb which affects the entire app.
317
+ * Add webhooks to generated home controller. This should help new users debug issues.
318
+
319
+ 7.4.0
320
+ -----
321
+ Known bug: Shop logged out when submitting a form for 'Shop' objects, fixed in 8.2.1 [[See #480 for details]](https://github.com/Shopify/shopify_app/issues/480)
322
+
323
+ * Add an after_authenticate job which will be run once the shop is authenticated. [[#431]](https://github.com/Shopify/shopify_app/pull/432)
324
+
325
+ 7.3.0
326
+ -----
327
+ Known bug: Shop logged out when submitting a form for 'Shop' objects, fixed in 8.2.1 [[See #480 for details]](https://github.com/Shopify/shopify_app/issues/480)
328
+
329
+ * Bump required omniauth-shopify-oauth2 version to 1.2.0.
330
+ * Always expect params[:shop] to be a string.
331
+
332
+ 7.2.11
333
+ -----
334
+ * Remove 'Logged in' flash message [[#425]](https://github.com/Shopify/shopify_app/pull/425)
335
+
336
+ 7.2.10
337
+ -----
338
+ * Fix an issue with the create_shops generator template
339
+ [[#423]](https://github.com/Shopify/shopify_app/pull/423)
340
+
341
+ 7.2.9
342
+ -----
343
+ * Remove support for Rails 4
344
+ [[#417]](https://github.com/Shopify/shopify_app/pull/417)
345
+
346
+ 7.2.8
347
+ -----
348
+ * Add i18n locale param support
349
+ [[#409]](https://github.com/Shopify/shopify_app/pull/409)
350
+
351
+
352
+ 7.2.7
353
+ -----
354
+ * Require `shopify_app` `>= 4.3.2`. This version relaxes the ruby version requirement from `>= 2.3.0` to `>= 2.0`
355
+ * Rails 5: ActionDispatch::Reloader#to_prepare is deprecated
356
+ [[#404]](https://github.com/Shopify/shopify_app/pull/404)
357
+
358
+ 7.2.6
359
+ -----
360
+ * Update LoginProtection#fullpage_redirect_to to get shopify domain from session
361
+ [[#401]](https://github.com/Shopify/shopify_app/pull/401)
362
+
363
+ 7.2.5
364
+ -----
365
+ * Update LoginProtection.redirection_javascript to work with absolute URLS
366
+ [[#389]](https://github.com/Shopify/shopify_app/pull/389)
367
+
368
+ 7.2.4
369
+ -----
370
+ * Fix redirect issue by sanitizing shop name on sessions#new
371
+
372
+ 7.2.3
373
+ -----
374
+ * Use postMessage to redirect parent iframe during authentication [[#366]](https://github.com/Shopify/shopify_app/pull/366)
375
+ * Add support for dynamically generating scripttag URLs
376
+ * Bug-fix: Update scripttags_manager_job
377
+ * Bug-fix: `--application_name` and `--scope` generates proper Configuration even when options supplied to them contain whitespaces.
378
+
379
+ 7.2.0
380
+ -----
381
+ * Disable application layout rendering for the `/login` page
382
+
383
+ 7.1.1
384
+ -----
385
+ * Lower required Ruby version to 2.2.2 to better match up with Rails 5.0
386
+
387
+ 7.1.0
388
+ -----
389
+ * Update login page copy
390
+ * Add application_name configuration option
391
+ * Add new optional App Proxy Controller Generator to the Engine. Refer README for details.
392
+ * Include ShopifyApp::LoginProtection in Authenticated and Session Controller directly instead of Application Controller.
393
+ * Loosen ShopifyAPI dependency requirements to `>= 4.2.2` and allow ShopifyAPI 4.3.0 and above.
394
+ * Move application.js to inside HEAD in Embedded App Template.
395
+ * Add ability to override the ActiveJob queue names in initializer file.
396
+
397
+ 7.0.11
398
+ ------
399
+ * Pass configured resources (like webhooks or scripttags) into the job rather than reading the config again. This allows for dynamically setting ShopifyApp config in a web request and having the job handle it correctly. This change does not affect the usage of webhooks or scripttags
400
+
401
+ 7.0.10
402
+ ------
403
+ * Loosen Rails dependency requirements to `>= 4.2.6` and allow Rails 5.0
404
+ * Add support for App Proxies
405
+
406
+ 7.0.9
407
+ -----
408
+
409
+ * Remove http-equiv meta tag as it causes OAuth issues in Chrome
410
+
411
+ 7.0.5
412
+ -----
413
+
414
+ * Remove obtrusive “Continue” text in redirects
415
+
416
+ 7.0.4
417
+ -----
418
+
419
+ * Bump required shopify_api version to 4.x.
420
+
421
+ 7.0.3
422
+ -----
423
+
424
+ * Bump required Rails version to `>= 4.2.6` since we are now using `ActiveSupport::SecurityUtils:Module`
425
+
426
+ 7.0.2
427
+ -----
428
+
429
+ * Fix CSRF redirect issue
430
+
431
+ 7.0.1
432
+ -----
433
+
434
+ * add support to i18n for flash messages (English and Spanish).
435
+
436
+ 7.0.0
437
+ -----
438
+
439
+ * rename WebhooksController module to WebhookVerification
440
+ * added a WebhooksController which automatically delegates to jobs
441
+ * moved all engine controllers under the ShopifyApp namespace
442
+ * rename SessionsController module to SessionsConcern
443
+ * more robust redirects, with valid HTML in HTTP response bodies
444
+ * `ShopifyApp::Controller` has been removed. You’ll need to replace all includes of `ShopifyApp::Controller` with `ShopifyApp::LoginProtection`
445
+ * adds add_webhook generator to make it easier to add new webhooks to your app
446
+ * update the install generator to use standard rails generate arguments, usage has changed from `-api_key=your_key` to `--api_key your_key`
447
+ * remove the redirect uri - this is done automatically inside omniauth now
448
+
449
+ 6.4.2
450
+ -----
451
+
452
+ * Update minimum required rails version to 4.2 to include active job
453
+
454
+ 6.4.0
455
+ -----
456
+
457
+ * More semantic and accessible markup in the sessions/new, embedded_app, and product
458
+ index views.
459
+ * Moved all JavaScript to load at the bottom of the page instead of the head, for
460
+ page loading better performance.
461
+
462
+ 6.3.0
463
+ -----
464
+
465
+ * Move SessionStorage from a generated class to a re-usable module. To
466
+ migrate to the new module, delete the old generated SessionStorage class
467
+ in the models directory and include the SessionStorage module in your Shop model.
468
+ * Adds a WebhooksManager class and allows you to configure what webhooks your app
469
+ needs. The rest is taken care of by ShopifyApp provided you set up a backgroud queue
470
+ with ActiveJob
471
+ * Adds a WebhooksController module which can be included to handle the boiler plate code
472
+ for a controller receiving webhooks from Shopify
473
+
474
+ 6.2.1
475
+ -----
476
+
477
+ * add callback url to omniauth provider
478
+ * add default redirect_uri
479
+
480
+ 6.2.0
481
+ -----
482
+
483
+ * Return an HTTP 401 for XHRs that aren't logged in
484
+
485
+ 6.1.3
486
+ -----
487
+ * add redirect_uri which is now required
488
+ * fix login again with different shop
489
+
490
+ 6.0.0
491
+ -----
492
+ * Re-written as a proper rails engine
493
+ * New modular generators
494
+ * generates embedded apps by default
495
+ * can bootstrap your app with a standard shop table and model
496
+ * code now lives as concerns in the engine which are included in your controllers
497
+ feel free to override anything you need in your app
498
+
499
+ Historical
500
+ ----------
501
+ * re-styled with Twitter Bootstrap css framework and updated docs [warren]
502
+ * Require shopify_api gem via proper railtie setup [willem]
503
+ * Don't require shopify.yml when using environment variables [cody]
504
+ * Renamed instances of current_shop to shop_session to maintain logic
505
+ * Replace old LoginController with a RESTful SessionsController