shopify_app 17.0.4 → 17.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) 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 +17 -1
  7. data/.github/workflows/build.yml +4 -1
  8. data/CHANGELOG.md +24 -0
  9. data/CONTRIBUTING.md +76 -0
  10. data/Gemfile.lock +81 -80
  11. data/README.md +72 -593
  12. data/app/controllers/concerns/shopify_app/shop_access_scopes_verification.rb +32 -0
  13. data/app/controllers/shopify_app/callback_controller.rb +24 -2
  14. data/app/controllers/shopify_app/sessions_controller.rb +13 -4
  15. data/config/locales/nl.yml +1 -1
  16. data/docs/Quickstart.md +15 -77
  17. data/docs/Troubleshooting.md +129 -4
  18. data/docs/Upgrading.md +126 -0
  19. data/docs/shopify_app/authentication.md +124 -0
  20. data/docs/shopify_app/engine.md +82 -0
  21. data/docs/shopify_app/generators.md +127 -0
  22. data/docs/shopify_app/handling-access-scopes-changes.md +14 -0
  23. data/docs/shopify_app/script-tags.md +28 -0
  24. data/docs/shopify_app/session-repository.md +88 -0
  25. data/docs/shopify_app/testing.md +38 -0
  26. data/docs/shopify_app/webhooks.md +72 -0
  27. data/lib/generators/shopify_app/home_controller/templates/home_controller.rb +2 -0
  28. data/lib/generators/shopify_app/home_controller/templates/unauthenticated_home_controller.rb +1 -0
  29. data/lib/generators/shopify_app/install/install_generator.rb +30 -1
  30. data/lib/generators/shopify_app/install/templates/embedded_app.html.erb +1 -1
  31. data/lib/generators/shopify_app/install/templates/omniauth.rb +1 -0
  32. data/lib/generators/shopify_app/install/templates/shopify_app.rb.tt +5 -2
  33. data/lib/generators/shopify_app/install/templates/shopify_provider.rb.tt +8 -0
  34. data/lib/generators/shopify_app/shop_model/shop_model_generator.rb +27 -0
  35. data/lib/generators/shopify_app/shop_model/templates/db/migrate/add_shop_access_scopes_column.erb +5 -0
  36. data/lib/generators/shopify_app/shop_model/templates/shop.rb +1 -1
  37. data/lib/generators/shopify_app/shopify_app_generator.rb +1 -1
  38. data/lib/generators/shopify_app/user_model/templates/db/migrate/add_user_access_scopes_column.erb +5 -0
  39. data/lib/generators/shopify_app/user_model/templates/user.rb +1 -1
  40. data/lib/generators/shopify_app/user_model/user_model_generator.rb +27 -0
  41. data/lib/shopify_app.rb +10 -0
  42. data/lib/shopify_app/access_scopes/noop_strategy.rb +13 -0
  43. data/lib/shopify_app/access_scopes/shop_strategy.rb +24 -0
  44. data/lib/shopify_app/access_scopes/user_strategy.rb +41 -0
  45. data/lib/shopify_app/configuration.rb +22 -0
  46. data/lib/shopify_app/middleware/same_site_cookie_middleware.rb +1 -1
  47. data/lib/shopify_app/omniauth/omniauth_configuration.rb +64 -0
  48. data/lib/shopify_app/session/in_memory_shop_session_store.rb +9 -7
  49. data/lib/shopify_app/session/in_memory_user_session_store.rb +9 -7
  50. data/lib/shopify_app/session/shop_session_storage_with_scopes.rb +58 -0
  51. data/lib/shopify_app/session/user_session_storage_with_scopes.rb +58 -0
  52. data/lib/shopify_app/utils.rb +12 -0
  53. data/lib/shopify_app/version.rb +1 -1
  54. data/package.json +1 -1
  55. data/shopify_app.gemspec +2 -2
  56. data/yarn.lock +16 -16
  57. metadata +29 -10
  58. data/.github/ISSUE_TEMPLATE.md +0 -19
  59. data/docs/install-on-dev-shop.png +0 -0
  60. data/docs/test-your-app.png +0 -0
  61. data/lib/generators/shopify_app/install/templates/shopify_provider.rb +0 -20
@@ -1,19 +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.
15
-
16
- Security
17
- --------
18
-
19
- Please be certain to redact any private information from your logs or code snippets such as Api Keys, Api Secrets, and any authentication tokens such as shop_tokens.
Binary file
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
- }