shopify_app 9.0.0 → 13.0.0

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.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +0 -2
  3. data/CHANGELOG.md +159 -0
  4. data/README.md +221 -130
  5. data/app/assets/javascripts/shopify_app/itp_helper.js +6 -6
  6. data/app/assets/javascripts/shopify_app/storage_access.js +36 -7
  7. data/app/controllers/concerns/shopify_app/authenticated.rb +2 -2
  8. data/app/controllers/shopify_app/callback_controller.rb +20 -7
  9. data/app/controllers/shopify_app/extension_verification_controller.rb +20 -0
  10. data/app/controllers/shopify_app/sessions_controller.rb +71 -22
  11. data/app/views/shopify_app/sessions/enable_cookies.html.erb +3 -1
  12. data/app/views/shopify_app/sessions/request_storage_access.html.erb +2 -1
  13. data/app/views/shopify_app/sessions/top_level_interaction.html.erb +1 -0
  14. data/app/views/shopify_app/shared/redirect.html.erb +1 -0
  15. data/config/locales/cs.yml +23 -0
  16. data/config/locales/da.yml +20 -0
  17. data/config/locales/de.yml +5 -5
  18. data/config/locales/en.yml +1 -1
  19. data/config/locales/es.yml +3 -3
  20. data/config/locales/fi.yml +20 -0
  21. data/config/locales/fr.yml +3 -3
  22. data/config/locales/hi.yml +23 -0
  23. data/config/locales/it.yml +2 -3
  24. data/config/locales/ja.yml +1 -1
  25. data/config/locales/ko.yml +19 -0
  26. data/config/locales/ms.yml +22 -0
  27. data/config/locales/nb.yml +21 -0
  28. data/config/locales/nl.yml +3 -3
  29. data/config/locales/pl.yml +21 -0
  30. data/config/locales/pt-BR.yml +9 -10
  31. data/config/locales/pt-PT.yml +22 -0
  32. data/config/locales/sv.yml +21 -0
  33. data/config/locales/th.yml +20 -0
  34. data/config/locales/tr.yml +22 -0
  35. data/config/locales/zh-CN.yml +3 -3
  36. data/config/locales/zh-TW.yml +1 -2
  37. data/docs/Quickstart.md +44 -16
  38. data/docs/Releasing.md +0 -1
  39. data/docs/install-on-dev-shop.png +0 -0
  40. data/docs/test-your-app.png +0 -0
  41. data/karma.conf.js +1 -0
  42. data/lib/generators/shopify_app/add_after_authenticate_job/add_after_authenticate_job_generator.rb +2 -2
  43. data/lib/generators/shopify_app/add_marketing_activity_extension/add_marketing_activity_extension_generator.rb +39 -0
  44. data/lib/generators/shopify_app/add_marketing_activity_extension/templates/marketing_activities_controller.rb +62 -0
  45. data/lib/generators/shopify_app/home_controller/home_controller_generator.rb +0 -6
  46. data/lib/generators/shopify_app/home_controller/templates/index.html.erb +1 -1
  47. data/lib/generators/shopify_app/install/install_generator.rb +27 -11
  48. data/lib/generators/shopify_app/install/templates/_flash_messages.html.erb +1 -17
  49. data/lib/generators/shopify_app/install/templates/embedded_app.html.erb +11 -10
  50. data/lib/generators/shopify_app/install/templates/flash_messages.js +26 -0
  51. data/lib/generators/shopify_app/install/templates/shopify_app.js +15 -0
  52. data/lib/generators/shopify_app/install/templates/shopify_app.rb +6 -3
  53. data/lib/generators/shopify_app/install/templates/shopify_app_index.js +2 -0
  54. data/lib/generators/shopify_app/install/templates/shopify_provider.rb +1 -0
  55. data/lib/generators/shopify_app/install/templates/user_agent.rb +5 -0
  56. data/lib/generators/shopify_app/shop_model/shop_model_generator.rb +1 -1
  57. data/lib/generators/shopify_app/shop_model/templates/shop.rb +1 -1
  58. data/lib/generators/shopify_app/user_model/templates/db/migrate/create_users.erb +16 -0
  59. data/lib/generators/shopify_app/user_model/templates/user.rb +7 -0
  60. data/lib/generators/shopify_app/user_model/templates/users.yml +4 -0
  61. data/lib/generators/shopify_app/user_model/user_model_generator.rb +38 -0
  62. data/lib/shopify_app/configuration.rb +22 -10
  63. data/lib/shopify_app/controller_concerns/login_protection.rb +66 -15
  64. data/lib/shopify_app/engine.rb +4 -0
  65. data/lib/shopify_app/managers/webhooks_manager.rb +1 -1
  66. data/lib/shopify_app/middleware/same_site_cookie_middleware.rb +33 -0
  67. data/lib/shopify_app/session/in_memory_session_store.rb +1 -1
  68. data/lib/shopify_app/session/in_memory_shop_session_store.rb +4 -0
  69. data/lib/shopify_app/session/in_memory_user_session_store.rb +4 -0
  70. data/lib/shopify_app/session/session_repository.rb +38 -13
  71. data/lib/shopify_app/session/session_storage.rb +0 -22
  72. data/lib/shopify_app/session/shop_session_storage.rb +30 -0
  73. data/lib/shopify_app/session/user_session_storage.rb +31 -0
  74. data/lib/shopify_app/utils.rb +7 -0
  75. data/lib/shopify_app/version.rb +1 -1
  76. data/lib/shopify_app.rb +48 -29
  77. data/package-lock.json +7227 -5
  78. data/package.json +9 -9
  79. data/service.yml +1 -1
  80. data/shopify_app.gemspec +10 -5
  81. data/translation.yml +1 -1
  82. data/yarn.lock +2555 -1886
  83. metadata +117 -19
  84. data/lib/generators/shopify_app/home_controller/templates/shopify_app_ready_script.html.erb +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f969c97f90fa13571a9e8af4b509148c1bd90a2f3c417e48c7beaa5d42f783c0
4
- data.tar.gz: a99fd49067d47fd6362c79eeb92f7c3c904ac52e14f5c7b59cf77e12ae3fb9b1
3
+ metadata.gz: d4e2d37f9112725500d1a9f36fe76b743e8981920eea4838024cafd6a71cb5eb
4
+ data.tar.gz: 3c52a0ee9a7f40433ad01b82bda3a0c6d30dd9bb45c319f1d457a0bd13c30fc0
5
5
  SHA512:
6
- metadata.gz: 825cddcd43bb04d549a3ec295452283f55cccfda4d2608bb45f66c28548843af8c527a00ef2c49b1f9d44696634d669a6684909899f2012b0ed0e637a0559b9e
7
- data.tar.gz: 8d4e54cef864888f554c64955feda1d03e9bfba3c2a237bbdb27f7a8364e12e4a3b2f49dfefa402b1799f5886539ca770aada0857e89a46c7098ab31ac3ee5d2
6
+ metadata.gz: 19a445a22b25b01f860a84128551234313bc44e7acd1583ec90bc96f59d65a8fac208feb1d5a6899453935dd19458196c5253605d85e3ac346be2fa405a50b4c
7
+ data.tar.gz: 526354098526753ade6d30a346ffa75b2280707638b66dba61c89b34a771e72dd4c23cfae8bda319de58a7a373e7c05d233a13a4f2f8325c7754cda1ed58d835
data/.travis.yml CHANGED
@@ -6,8 +6,6 @@ before_script:
6
6
  - "sudo chown root /opt/google/chrome/chrome-sandbox"
7
7
  - "sudo chmod 4755 /opt/google/chrome/chrome-sandbox"
8
8
  language: ruby
9
- before_install:
10
- - gem update --system
11
9
  cache:
12
10
  bundler: true
13
11
  directories:
data/CHANGELOG.md CHANGED
@@ -1,3 +1,161 @@
1
+ 13.0.0
2
+ ------
3
+ + #887 Added concurrent user and shop session support (online/offline)
4
+ BREAKING, please see README for migration notes.
5
+
6
+ 12.0.7
7
+ ------
8
+ * Remove check for API_KEY in config that was throwing errors during install #919
9
+
10
+ 12.0.6
11
+ ------
12
+ * Adds changelog information and README updates for 8.4.0 #916
13
+
14
+ 12.0.5
15
+ ------
16
+ * Updating shopify_api gem to 9.0.1
17
+
18
+ 12.0.4
19
+ ------
20
+ * Reverts reverted PR (#895) #897
21
+
22
+ 12.0.3
23
+ ------
24
+ * Moves samesite middleware higher in the stack #898
25
+ * Fix issue where not redirecting user to granted storage page casues infinite loop #900
26
+
27
+ 12.0.2
28
+ ------
29
+ * Reverts "Fix for return_to in safari after enable_cookies/granted_storage_access" introduced in 12.0.1
30
+
31
+ 12.0.1
32
+ ------
33
+ * disable samesite cookie middleware in tests
34
+ * middleware compatibility for ruby 2.3
35
+ * samesite cookie fixes for javascript libraries
36
+ * change generators to add AppBridge instead of EASDK
37
+ * Fix for return_to in safari after enable_cookies/granted_storage_access
38
+
39
+ 12.0.0
40
+ -----
41
+ * Updating shopify_api gem to 9.0.0
42
+
43
+ 11.7.1
44
+ -----
45
+ * Fix to allow SessionStorage to be flexible on what model names that the are used for storing shop and user data
46
+
47
+ 11.7.0
48
+ -----
49
+ * 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)
50
+ * Add back per-user token support (added in 11.5.0, reverted in 11.5.1)
51
+ * 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)
52
+
53
+ 11.6.0
54
+ -----
55
+ * Enable SameSite=None; Secure by default on all cookies for embedded apps [#851](https://github.com/Shopify/shopify_app/pull/851)
56
+ * Ensures compatibility of embedded apps with upcoming Chrome version 80 changes to cookie behaviour
57
+ * Configurable via `ShopifyApp.configuration.enable_same_site_none` (default true for embedded apps)
58
+
59
+ 11.5.1
60
+ -----
61
+ * Revert per-user token support temporarily
62
+
63
+ 11.5.0
64
+ -----
65
+ * Modularizes durable session storage
66
+ * Introduces per-user token support and user session management
67
+
68
+ 11.4.0
69
+ -----
70
+ * Remove `dotenv-rails` dependency. [#835](https://github.com/Shopify/shopify_app/pull/835)
71
+
72
+ 11.3.2
73
+ -----
74
+ * Fix hosts generator in Rails 5 [#823](https://github.com/Shopify/shopify_app/pull/823)
75
+
76
+ 11.3.1
77
+ -----
78
+ * Bump browser_sniffer version to 1.1.3 [#824](https://github.com/Shopify/shopify_app/pull/824)
79
+
80
+ 11.3.0
81
+ -----
82
+ * Update assets to be compatible with Rails 6 [#808](https://github.com/Shopify/shopify_app/pull/808)
83
+
84
+ 11.2.1
85
+ -----
86
+ * Adds ngrok whitelist in development [#802](https://github.com/Shopify/shopify_app/pull/802)
87
+
88
+ 11.2.0
89
+ -----
90
+
91
+ * Bump omniauth-shopify-oauth2 gem to v2.2.0
92
+
93
+ 11.1.0
94
+ -----
95
+
96
+ * Add Webmock and Pry as development dependencies
97
+ * 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)
98
+
99
+
100
+ 11.0.2
101
+ -----
102
+
103
+ * Lock shopify_api gem dependency to `~> 7.0` from `>= 7.0.0`.
104
+ * Remove flakey JS Tests
105
+ * bump sqlite3 development dependency to `~>1.4` from `~> 1.3.6`. [#789](https://github.com/Shopify/shopify_app/pull/789)
106
+
107
+ 11.0.1
108
+ -----
109
+
110
+ * Add dotenv-rails gem to install generator, so apps fetch credentials from `.env` by default: [#776](https://github.com/Shopify/shopify_app/pull/776)
111
+
112
+ 11.0.0
113
+ -----
114
+
115
+ * Rename `login_url` method to `login_url_with_optional_shop` to avoid ambiguity with Rails' route helper method of the
116
+ same name (see [#585](https://github.com/Shopify/shopify_app/pull/585)).
117
+
118
+ 10.0.0
119
+ -----
120
+
121
+ * Make sure OAuth-related redirects return user to originally requested URL once authenticated
122
+ * Add/update translations
123
+ * Update README to clarify nested routes
124
+ * Remove example app. Users should instead use the generators to scaffold an example app.
125
+ * Bump required Rails version to `> 5.2.1` to ensure `5.2.1.1` or greater is used. This ensures two things:
126
+ * Apps are not vulnerable to [CVE-2018-16476](https://nvd.nist.gov/vuln/detail/CVE-2018-16476)
127
+ * Webhook payloads, from Shopify for API version 2019-07, which are processed in ActiveJob background jobs (the
128
+ default behaviour of shopify_app's WebhooksController) are compatible, due to how ActiveJob versions prior to
129
+ 5.2.1.1 process GlobalIDs encoded as string in job parameters. This prevents the
130
+ [exceptions reported previously](https://github.com/Shopify/shopify_app/issues/600).
131
+
132
+ 9.0.4
133
+ -----
134
+
135
+ * Fix returning to a deep link after authentication [#746](https://github.com/Shopify/shopify_app/pull/746)
136
+
137
+ 9.0.3
138
+ -----
139
+
140
+ * Add `meta viewport` tags to fix mobile responsive problems
141
+ * Remove outdated, extraneous `yarn.lock` file (and rely on existing `package-lock.json` instead)
142
+ * Move inline js to a js asset file
143
+ * Minor documentation corrections
144
+
145
+ 9.0.2
146
+ -----
147
+
148
+ * Update browser_sniffer to fix unnecessary ITP flows in Shopify Mobile
149
+ * Add additional languages to translation.yml
150
+ * Minor documentation corrections
151
+
152
+ 9.0.1
153
+ -----
154
+
155
+ * Minor documentation corrections
156
+ * Handle `Webhook.all` returning `nil` and raising on `index_by`
157
+
158
+
1
159
  9.0.0
2
160
  -----
3
161
 
@@ -46,6 +204,7 @@ Added support for rotating Shopify access tokens:
46
204
  8.4.0
47
205
  ----
48
206
  * Fix embedded app session management in Safari 12.1
207
+ * 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
49
208
  * Shop names passed to OAuth are no longer case sensitive
50
209
 
51
210
  8.3.2