Skip to content

Conversation

@onbuyuka
Copy link
Contributor

@onbuyuka onbuyuka commented Feb 9, 2026

Problem

When users create Shopify trial stores, Shopify provisions the store with a random internal URL (e.g., fwlifjsl-rr.myshopify.com) but displays a different "friendly" URL to the user (e.g., shoping.myshopify.com).

During the OAuth flow:

  1. User enters the friendly URL they see in Shopify admin
  2. OAuth completes successfully, but Shopify returns the real internal myshopify_domain in the callback
  3. The access token gets saved under the internal URL
  4. Business Central tries to use the token with the original user-entered URL → fails with "No access token" error

Solution

When the store URL returned from Shopify during OAuth differs from what the user entered, prompt the user to correct the store URL. If confirmed, the Shop record is updated to use the actual myshopify_domain that Shopify uses internally.

Changes

ShpfyAuthenticationMgt.Codeunit.al

  • Modified InstallShopifyApp to accept a var Shop parameter
  • Added store URL mismatch detection after OAuth callback
  • When mismatch detected, prompts user to correct the URL with confirmation dialog
  • Fixed typo: InstalllToStoreInstallToStore

ShpfyShop.Table.al

  • Added SetStoreName(Store: Text) procedure to update the Shopify URL with validation
  • Updated RequestAccessToken() to pass the Shop record to InstallShopifyApp

Fixes AB#621115

@onbuyuka onbuyuka requested a review from a team as a code owner February 9, 2026 17:37
@github-actions github-actions bot added the AL: Apps (W1) Add-on apps for W1 label Feb 9, 2026
@github-actions github-actions bot modified the milestone: Version 28.0 Feb 9, 2026
@onbuyuka onbuyuka enabled auto-merge (squash) February 10, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant