shopify_app 14.4.4 → 18.0.2
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 +41 -0
- data/.github/workflows/release.yml +24 -0
- data/.github/workflows/rubocop.yml +1 -7
- data/.gitignore +0 -2
- data/CHANGELOG.md +75 -0
- data/CONTRIBUTING.md +76 -0
- data/Gemfile.lock +268 -0
- data/README.md +73 -572
- data/app/assets/images/storage_access.svg +1 -2
- data/app/assets/javascripts/shopify_app/post_redirect.js +9 -0
- data/app/controllers/concerns/shopify_app/ensure_authenticated_links.rb +26 -0
- data/app/controllers/concerns/shopify_app/shop_access_scopes_verification.rb +32 -0
- data/app/controllers/shopify_app/callback_controller.rb +34 -10
- data/app/controllers/shopify_app/sessions_controller.rb +19 -20
- data/app/views/shopify_app/partials/_button_styles.html.erb +41 -36
- data/app/views/shopify_app/partials/_card_styles.html.erb +3 -3
- data/app/views/shopify_app/partials/_empty_state_styles.html.erb +28 -59
- data/app/views/shopify_app/partials/_form_styles.html.erb +56 -0
- data/app/views/shopify_app/partials/_layout_styles.html.erb +16 -1
- data/app/views/shopify_app/partials/_typography_styles.html.erb +6 -6
- data/app/views/shopify_app/sessions/enable_cookies.html.erb +1 -1
- data/app/views/shopify_app/sessions/new.html.erb +38 -110
- data/app/views/shopify_app/sessions/request_storage_access.html.erb +1 -1
- data/app/views/shopify_app/sessions/top_level_interaction.html.erb +20 -15
- data/app/views/shopify_app/shared/post_redirect_to_auth_shopify.html.erb +13 -0
- data/config/locales/de.yml +11 -11
- data/config/locales/nl.yml +1 -1
- data/config/locales/vi.yml +22 -0
- data/config/locales/zh-CN.yml +1 -1
- data/docs/Quickstart.md +15 -77
- data/docs/Releasing.md +9 -6
- data/docs/Troubleshooting.md +147 -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/home_controller_generator.rb +16 -7
- data/lib/generators/shopify_app/home_controller/templates/home_controller.rb +10 -0
- data/lib/generators/shopify_app/home_controller/templates/index.html.erb +11 -11
- data/lib/generators/shopify_app/home_controller/templates/unauthenticated_home_controller.rb +2 -0
- data/lib/generators/shopify_app/install/install_generator.rb +36 -2
- data/lib/generators/shopify_app/install/templates/embedded_app.html.erb +2 -1
- data/lib/generators/shopify_app/install/templates/omniauth.rb +1 -0
- data/lib/generators/shopify_app/install/templates/shopify_app.js +1 -1
- data/lib/generators/shopify_app/install/templates/shopify_app.rb.tt +13 -4
- 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/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 +25 -0
- data/lib/shopify_app/controller_concerns/itp.rb +0 -2
- data/lib/shopify_app/controller_concerns/login_protection.rb +14 -17
- data/lib/shopify_app/engine.rb +1 -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/jwt.rb +3 -1
- 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/lib/shopify_app.rb +11 -0
- data/package.json +1 -1
- data/service.yml +1 -4
- data/shopify_app.gemspec +5 -4
- data/translation.yml +1 -1
- data/yarn.lock +92 -123
- metadata +62 -16
- data/.github/ISSUE_TEMPLATE.md +0 -19
- data/.travis.yml +0 -27
- 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/.travis.yml
DELETED
@@ -1,27 +0,0 @@
|
|
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.5
|
17
|
-
- 2.6
|
18
|
-
- 2.7
|
19
|
-
|
20
|
-
install:
|
21
|
-
- bundle install
|
22
|
-
- nvm install node
|
23
|
-
- yarn
|
24
|
-
|
25
|
-
script:
|
26
|
-
- yarn test
|
27
|
-
- bundle exec rake test
|
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
|
-
}
|