From 2c666896609166795f47d305d8b514d53895c49d Mon Sep 17 00:00:00 2001 From: Rachel Carvalho Date: Tue, 27 Aug 2024 10:22:29 -0400 Subject: [PATCH 1/3] add embedded_app layout info to token exchange docs --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4b6e106b8..96e21f249 100644 --- a/README.md +++ b/README.md @@ -169,10 +169,11 @@ ShopifyApp.configure do |config| end ``` -3. Handle special callback logic. If your app has overridden the OAuth CallbackController to run special tasks post authorization, +3. Handle special callback logic. If your app has overridden the OAuth CallbackController to run special tasks post authorization, you'll need to create and configure a custom PostAuthenticateTasks class to run these tasks after the token exchange. The original OAuth CallbackController will not be triggered anymore. See [Post Authenticate Tasks documentation](/docs/shopify_app/authentication.md#post-authenticate-tasks) for more information. -4. Enjoy a smoother and faster app installation process. +4. Make sure your `embedded_app` layout is correct. If your app has any Controllers which include `ShopifyApp::EnsureInstalled`, they will now also include `ShopifyApp::EmbeddedApp` concern. See [this concern's documentation](/docs/shopify_app/controller-concerns.md#embeddedapp) for more information. +5. Enjoy a smoother and faster app installation process. ### API Versioning From b9952c7cc7f1a510c9cfdfb0a0da35b96b1d6816 Mon Sep 17 00:00:00 2001 From: Rachel Carvalho Date: Tue, 27 Aug 2024 10:39:26 -0400 Subject: [PATCH 2/3] add ShopifyAPI::Context.setup reminder to Rotate API credentials docs --- docs/shopify_app/authentication.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/shopify_app/authentication.md b/docs/shopify_app/authentication.md index 0ee464af4..60c2a8c1f 100644 --- a/docs/shopify_app/authentication.md +++ b/docs/shopify_app/authentication.md @@ -195,6 +195,17 @@ config.secret = Rails.application.secrets.shopify_secret config.old_secret = Rails.application.secrets.old_shopify_secret ``` +Also make sure the old secret is specified when setting up `ShopifyAPI::Context` as well: + +```ruby +ShopifyAPI::Context.setup( + api_key: ShopifyApp.configuration.api_key, + api_secret_key: ShopifyApp.configuration.secret, + # ... + old_api_secret_key: ShopifyApp.configuration.old_secret, +) +``` + We've provided a generator which creates the job and an example rake task: ```sh From a37bb9b4b6532c362f17006d531420d8495bd997 Mon Sep 17 00:00:00 2001 From: Rachel Carvalho Date: Wed, 28 Aug 2024 09:59:35 -0400 Subject: [PATCH 3/3] expand on effects of new_embedded_auth_strategy on EnsureInstalled --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 96e21f249..d9fb6c5cc 100644 --- a/README.md +++ b/README.md @@ -172,7 +172,7 @@ end 3. Handle special callback logic. If your app has overridden the OAuth CallbackController to run special tasks post authorization, you'll need to create and configure a custom PostAuthenticateTasks class to run these tasks after the token exchange. The original OAuth CallbackController will not be triggered anymore. See [Post Authenticate Tasks documentation](/docs/shopify_app/authentication.md#post-authenticate-tasks) for more information. -4. Make sure your `embedded_app` layout is correct. If your app has any Controllers which include `ShopifyApp::EnsureInstalled`, they will now also include `ShopifyApp::EmbeddedApp` concern. See [this concern's documentation](/docs/shopify_app/controller-concerns.md#embeddedapp) for more information. +4. Make sure your `embedded_app` layout is correct. If your app has any controller which includes `ShopifyApp::EnsureInstalled`, they will now also include the `ShopifyApp::EmbeddedApp` concern, which sets `layout 'embedded_app'` for the current controller by default. In cases where the controller originally looked for another layout file, this can cause unexpected behavior. See [`EmbeddedApp` concern's documentation](/docs/shopify_app/controller-concerns.md#embeddedapp) for more information on the effects of this concern and how to disable the layout change if needed. 5. Enjoy a smoother and faster app installation process. ### API Versioning