shopify_app 13.0.0 → 18.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (145) hide show
  1. checksums.yaml +4 -4
  2. data/.github/CODEOWNERS +1 -0
  3. data/.github/ISSUE_TEMPLATE/bug-report.md +63 -0
  4. data/.github/ISSUE_TEMPLATE/config.yml +1 -0
  5. data/.github/ISSUE_TEMPLATE/feature-request.md +33 -0
  6. data/.github/PULL_REQUEST_TEMPLATE.md +22 -0
  7. data/.github/workflows/build.yml +41 -0
  8. data/.github/workflows/release.yml +24 -0
  9. data/.github/workflows/rubocop.yml +22 -0
  10. data/.gitignore +0 -2
  11. data/.rubocop.yml +14 -6
  12. data/CHANGELOG.md +158 -0
  13. data/CONTRIBUTING.md +76 -0
  14. data/Gemfile +5 -0
  15. data/Gemfile.lock +268 -0
  16. data/README.md +73 -534
  17. data/Rakefile +1 -0
  18. data/SECURITY.md +59 -0
  19. data/app/assets/images/storage_access.svg +1 -2
  20. data/app/assets/javascripts/shopify_app/post_redirect.js +9 -0
  21. data/app/assets/javascripts/shopify_app/storage_access.js +2 -1
  22. data/app/assets/javascripts/shopify_app/top_level_interaction.js +1 -1
  23. data/app/controllers/concerns/shopify_app/authenticated.rb +1 -0
  24. data/app/controllers/concerns/shopify_app/ensure_authenticated_links.rb +26 -0
  25. data/app/controllers/concerns/shopify_app/require_known_shop.rb +39 -0
  26. data/app/controllers/concerns/shopify_app/shop_access_scopes_verification.rb +32 -0
  27. data/app/controllers/shopify_app/authenticated_controller.rb +1 -0
  28. data/app/controllers/shopify_app/callback_controller.rb +104 -18
  29. data/app/controllers/shopify_app/extension_verification_controller.rb +2 -7
  30. data/app/controllers/shopify_app/sessions_controller.rb +26 -10
  31. data/app/controllers/shopify_app/webhooks_controller.rb +6 -5
  32. data/app/views/shopify_app/partials/_button_styles.html.erb +41 -36
  33. data/app/views/shopify_app/partials/_card_styles.html.erb +3 -3
  34. data/app/views/shopify_app/partials/_empty_state_styles.html.erb +28 -59
  35. data/app/views/shopify_app/partials/_form_styles.html.erb +56 -0
  36. data/app/views/shopify_app/partials/_layout_styles.html.erb +16 -1
  37. data/app/views/shopify_app/partials/_typography_styles.html.erb +6 -6
  38. data/app/views/shopify_app/sessions/enable_cookies.html.erb +2 -7
  39. data/app/views/shopify_app/sessions/new.html.erb +38 -110
  40. data/app/views/shopify_app/sessions/request_storage_access.html.erb +1 -1
  41. data/app/views/shopify_app/sessions/top_level_interaction.html.erb +21 -22
  42. data/app/views/shopify_app/shared/post_redirect_to_auth_shopify.html.erb +13 -0
  43. data/config/locales/de.yml +11 -11
  44. data/config/locales/fi.yml +1 -1
  45. data/config/locales/nl.yml +8 -8
  46. data/config/locales/th.yml +4 -4
  47. data/config/locales/vi.yml +22 -0
  48. data/config/locales/zh-CN.yml +1 -1
  49. data/config/routes.rb +1 -0
  50. data/docs/Quickstart.md +15 -87
  51. data/docs/Releasing.md +18 -14
  52. data/docs/Troubleshooting.md +147 -4
  53. data/docs/Upgrading.md +126 -0
  54. data/docs/shopify_app/authentication.md +124 -0
  55. data/docs/shopify_app/engine.md +82 -0
  56. data/docs/shopify_app/generators.md +127 -0
  57. data/docs/shopify_app/handling-access-scopes-changes.md +14 -0
  58. data/docs/shopify_app/script-tags.md +28 -0
  59. data/docs/shopify_app/session-repository.md +88 -0
  60. data/docs/shopify_app/testing.md +38 -0
  61. data/docs/shopify_app/webhooks.md +72 -0
  62. data/karma.conf.js +1 -1
  63. data/lib/generators/shopify_app/add_after_authenticate_job/add_after_authenticate_job_generator.rb +5 -3
  64. data/lib/generators/shopify_app/add_after_authenticate_job/templates/after_authenticate_job.rb +1 -0
  65. data/lib/generators/shopify_app/add_marketing_activity_extension/add_marketing_activity_extension_generator.rb +2 -1
  66. data/lib/generators/shopify_app/add_marketing_activity_extension/templates/marketing_activities_controller.rb +4 -4
  67. data/lib/generators/shopify_app/add_webhook/add_webhook_generator.rb +5 -4
  68. data/lib/generators/shopify_app/add_webhook/templates/{webhook_job.rb → webhook_job.rb.tt} +5 -0
  69. data/lib/generators/shopify_app/app_proxy_controller/app_proxy_controller_generator.rb +4 -3
  70. data/lib/generators/shopify_app/app_proxy_controller/templates/app_proxy_controller.rb +3 -3
  71. data/lib/generators/shopify_app/app_proxy_controller/templates/app_proxy_route.rb +10 -9
  72. data/lib/generators/shopify_app/authenticated_controller/authenticated_controller_generator.rb +1 -1
  73. data/lib/generators/shopify_app/controllers/controllers_generator.rb +2 -1
  74. data/lib/generators/shopify_app/home_controller/home_controller_generator.rb +31 -3
  75. data/lib/generators/shopify_app/home_controller/templates/home_controller.rb +10 -0
  76. data/lib/generators/shopify_app/home_controller/templates/index.html.erb +66 -16
  77. data/lib/generators/shopify_app/home_controller/templates/unauthenticated_home_controller.rb +12 -0
  78. data/lib/generators/shopify_app/install/install_generator.rb +46 -11
  79. data/lib/generators/shopify_app/install/templates/embedded_app.html.erb +3 -2
  80. data/lib/generators/shopify_app/install/templates/flash_messages.js +0 -2
  81. data/lib/generators/shopify_app/install/templates/omniauth.rb +3 -1
  82. data/lib/generators/shopify_app/install/templates/shopify_app.js +1 -1
  83. data/lib/generators/shopify_app/install/templates/shopify_app.rb.tt +25 -0
  84. data/lib/generators/shopify_app/install/templates/shopify_provider.rb.tt +8 -0
  85. data/lib/generators/shopify_app/install/templates/user_agent.rb +2 -1
  86. data/lib/generators/shopify_app/products_controller/products_controller_generator.rb +19 -0
  87. data/lib/generators/shopify_app/products_controller/templates/products_controller.rb +8 -0
  88. data/lib/generators/shopify_app/routes/routes_generator.rb +1 -0
  89. data/lib/generators/shopify_app/routes/templates/routes.rb +10 -9
  90. data/lib/generators/shopify_app/shop_model/shop_model_generator.rb +39 -7
  91. data/lib/generators/shopify_app/shop_model/templates/db/migrate/add_shop_access_scopes_column.erb +5 -0
  92. data/lib/generators/shopify_app/shop_model/templates/shop.rb +2 -1
  93. data/lib/generators/shopify_app/shopify_app_generator.rb +4 -3
  94. data/lib/generators/shopify_app/user_model/templates/db/migrate/add_user_access_scopes_column.erb +5 -0
  95. data/lib/generators/shopify_app/user_model/templates/user.rb +2 -1
  96. data/lib/generators/shopify_app/user_model/user_model_generator.rb +39 -7
  97. data/lib/generators/shopify_app/views/views_generator.rb +2 -1
  98. data/lib/shopify_app/access_scopes/noop_strategy.rb +13 -0
  99. data/lib/shopify_app/access_scopes/shop_strategy.rb +24 -0
  100. data/lib/shopify_app/access_scopes/user_strategy.rb +41 -0
  101. data/lib/shopify_app/configuration.rb +40 -8
  102. data/lib/shopify_app/controller_concerns/app_proxy_verification.rb +3 -3
  103. data/lib/shopify_app/controller_concerns/csrf_protection.rb +15 -0
  104. data/lib/shopify_app/controller_concerns/embedded_app.rb +3 -2
  105. data/lib/shopify_app/controller_concerns/localization.rb +1 -0
  106. data/lib/shopify_app/controller_concerns/login_protection.rb +81 -16
  107. data/lib/shopify_app/controller_concerns/payload_verification.rb +24 -0
  108. data/lib/shopify_app/controller_concerns/webhook_verification.rb +3 -18
  109. data/lib/shopify_app/engine.rb +27 -0
  110. data/lib/shopify_app/jobs/scripttags_manager_job.rb +1 -1
  111. data/lib/shopify_app/jobs/webhooks_manager_job.rb +1 -1
  112. data/lib/shopify_app/managers/scripttags_manager.rb +4 -3
  113. data/lib/shopify_app/managers/webhooks_manager.rb +4 -3
  114. data/lib/shopify_app/middleware/jwt_middleware.rb +42 -0
  115. data/lib/shopify_app/middleware/same_site_cookie_middleware.rb +3 -2
  116. data/lib/shopify_app/omniauth/omniauth_configuration.rb +64 -0
  117. data/lib/shopify_app/session/in_memory_session_store.rb +7 -3
  118. data/lib/shopify_app/session/in_memory_shop_session_store.rb +12 -0
  119. data/lib/shopify_app/session/in_memory_user_session_store.rb +12 -0
  120. data/lib/shopify_app/session/jwt.rb +63 -0
  121. data/lib/shopify_app/session/null_user_session_store.rb +22 -0
  122. data/lib/shopify_app/session/session_repository.rb +13 -16
  123. data/lib/shopify_app/session/session_storage.rb +1 -0
  124. data/lib/shopify_app/session/shop_session_storage.rb +21 -9
  125. data/lib/shopify_app/session/shop_session_storage_with_scopes.rb +58 -0
  126. data/lib/shopify_app/session/user_session_storage.rb +19 -8
  127. data/lib/shopify_app/session/user_session_storage_with_scopes.rb +58 -0
  128. data/lib/shopify_app/test_helpers/all.rb +2 -0
  129. data/lib/shopify_app/test_helpers/webhook_verification_helper.rb +17 -0
  130. data/lib/shopify_app/utils.rb +18 -5
  131. data/lib/shopify_app/version.rb +2 -1
  132. data/lib/shopify_app.rb +23 -5
  133. data/package.json +7 -8
  134. data/service.yml +1 -4
  135. data/shopify_app.gemspec +15 -9
  136. data/translation.yml +1 -1
  137. data/yarn.lock +2140 -2188
  138. metadata +107 -19
  139. data/.github/ISSUE_TEMPLATE.md +0 -14
  140. data/.travis.yml +0 -27
  141. data/docs/install-on-dev-shop.png +0 -0
  142. data/docs/test-your-app.png +0 -0
  143. data/lib/generators/shopify_app/install/templates/shopify_app.rb +0 -15
  144. data/lib/generators/shopify_app/install/templates/shopify_provider.rb +0 -20
  145. data/package-lock.json +0 -7245

There are too many changes on this page to be displayed.


The amount of changes on this page would crash your brower.

You can still verify the content by downloading the gem file manually.