shopify_app 17.0.3 → 17.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 +17 -1
- data/.github/workflows/build.yml +4 -1
- data/CHANGELOG.md +22 -0
- data/CONTRIBUTING.md +76 -0
- data/Gemfile.lock +81 -80
- data/README.md +72 -593
- data/app/controllers/concerns/shopify_app/ensure_authenticated_links.rb +4 -0
- data/app/controllers/concerns/shopify_app/shop_access_scopes_verification.rb +32 -0
- data/app/controllers/shopify_app/callback_controller.rb +24 -2
- data/app/controllers/shopify_app/sessions_controller.rb +13 -4
- data/config/locales/nl.yml +1 -1
- data/docs/Quickstart.md +15 -77
- data/docs/Troubleshooting.md +129 -4
- data/docs/Upgrading.md +126 -0
- data/docs/shopify_app/authentication.md +124 -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 +14 -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/lib/generators/shopify_app/home_controller/templates/home_controller.rb +2 -0
- data/lib/generators/shopify_app/home_controller/templates/unauthenticated_home_controller.rb +1 -0
- data/lib/generators/shopify_app/install/install_generator.rb +30 -1
- data/lib/generators/shopify_app/install/templates/omniauth.rb +1 -0
- data/lib/generators/shopify_app/install/templates/shopify_app.rb.tt +5 -2
- data/lib/generators/shopify_app/install/templates/shopify_provider.rb.tt +8 -0
- data/lib/generators/shopify_app/shop_model/shop_model_generator.rb +27 -0
- 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 +1 -1
- data/lib/generators/shopify_app/shopify_app_generator.rb +1 -1
- 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 +1 -1
- data/lib/generators/shopify_app/user_model/user_model_generator.rb +27 -0
- data/lib/shopify_app.rb +10 -0
- 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 +22 -0
- data/lib/shopify_app/middleware/same_site_cookie_middleware.rb +1 -1
- data/lib/shopify_app/omniauth/omniauth_configuration.rb +64 -0
- data/lib/shopify_app/session/in_memory_shop_session_store.rb +9 -7
- data/lib/shopify_app/session/in_memory_user_session_store.rb +9 -7
- data/lib/shopify_app/session/shop_session_storage_with_scopes.rb +58 -0
- data/lib/shopify_app/session/user_session_storage_with_scopes.rb +58 -0
- data/lib/shopify_app/utils.rb +12 -0
- data/lib/shopify_app/version.rb +1 -1
- data/package.json +1 -1
- data/shopify_app.gemspec +2 -2
- metadata +29 -10
- data/.github/ISSUE_TEMPLATE.md +0 -19
- data/docs/install-on-dev-shop.png +0 -0
- data/docs/test-your-app.png +0 -0
- data/lib/generators/shopify_app/install/templates/shopify_provider.rb +0 -20
data/.github/ISSUE_TEMPLATE.md
DELETED
@@ -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
|
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
|
-
}
|