From 55fb21f936d55f801c39c21a2c49e764a10b2d1c Mon Sep 17 00:00:00 2001 From: jecepeda Date: Thu, 14 Aug 2025 15:40:03 +0200 Subject: [PATCH 1/3] Update oauth logic to account for new admin-web url --- lib/shopify_api/auth/oauth.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/shopify_api/auth/oauth.rb b/lib/shopify_api/auth/oauth.rb index 807b563ee..10ee388d3 100644 --- a/lib/shopify_api/auth/oauth.rb +++ b/lib/shopify_api/auth/oauth.rb @@ -114,8 +114,9 @@ def auth_base_uri(shop) return "https://#{shop}/admin" unless defined?(DevServer) && shop.include?(".my.shop.dev") # For first-party apps in development only, we leverage DevServer to build the admin base URI - admin_web = T.unsafe(Object.const_get("DevServer")).new("web") # rubocop:disable Sorbet/ConstantsFromStrings - admin_host = admin_web.host!(nonstandard_host_prefix: "admin") + admin_web = T.unsafe(Object.const_get("DevServer")) # rubocop:disable Sorbet/ConstantsFromStrings + .new("admin-web") + admin_host = admin_web.host! shop_name = shop.split(".").first "https://#{admin_host}/store/#{shop_name}" From db5652771c07e0f5b33b63c1eca9ceabb7729d69 Mon Sep 17 00:00:00 2001 From: jecepeda Date: Thu, 14 Aug 2025 19:34:54 +0200 Subject: [PATCH 2/3] Use nonstandard_host_prefix --- lib/shopify_api/auth/oauth.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/shopify_api/auth/oauth.rb b/lib/shopify_api/auth/oauth.rb index 10ee388d3..eedd19aa4 100644 --- a/lib/shopify_api/auth/oauth.rb +++ b/lib/shopify_api/auth/oauth.rb @@ -116,7 +116,7 @@ def auth_base_uri(shop) # For first-party apps in development only, we leverage DevServer to build the admin base URI admin_web = T.unsafe(Object.const_get("DevServer")) # rubocop:disable Sorbet/ConstantsFromStrings .new("admin-web") - admin_host = admin_web.host! + admin_host = admin_web.host!(nonstandard_host_prefix: "admin") shop_name = shop.split(".").first "https://#{admin_host}/store/#{shop_name}" From 6091abb95ac7e2bdb37b73a79b451c91a891aec5 Mon Sep 17 00:00:00 2001 From: jecepeda Date: Thu, 14 Aug 2025 20:13:21 +0200 Subject: [PATCH 3/3] Reflect new changes in CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a87f51ace..1c5d2554b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ Note: For changes to the API, see https://shopify.dev/changelog?filter=api ## Unreleased +- [#1395](https://github.com/Shopify/shopify-api-ruby/pull/1395) use correct internal admin host for 1P app development ## 14.11.0 - [#1386](https://github.com/Shopify/shopify-api-ruby/pull/1386) Add support for 2025-07 API version