Skip to content

Commit 75bff52

Browse files
committed
fix(shopify): align shop domain regex with shopify handle rules (3-60 lowercase, no edge hyphens)
1 parent ec2c02b commit 75bff52

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/sim/lib/api/contracts/oauth-connections.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export const oauthAuthorizeParamsResponseSchema = z.object({
143143
response_type: z.literal('code'),
144144
})
145145

146-
const SHOPIFY_SHOP_DOMAIN_REGEX = /^[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.myshopify\.com$/
146+
const SHOPIFY_SHOP_DOMAIN_REGEX = /^[a-z0-9][a-z0-9-]{1,58}[a-z0-9]\.myshopify\.com$/
147147
export const shopifyShopDomainSchema = z.string().regex(SHOPIFY_SHOP_DOMAIN_REGEX)
148148

149149
export const listOAuthConnectionsContract = defineRouteContract({

0 commit comments

Comments
 (0)