Skip to content

Commit

Permalink
fix: shopify shop validation
Browse files Browse the repository at this point in the history
  • Loading branch information
felipap committed Nov 24, 2024
1 parent 5f695f3 commit 7d86e35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions handshake/src/providers/shopify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ export const Shopify: HandlerFactory<Args, ShopifyAppCredential> = ({
}

// TODO validate shop value.
if (!extras.shop.match(/^[a-zA-Z][a-zA-Z_-]*\.myshopify.com$/)) {
throw Error("Invalid shop value.");
if (!extras.shop.match(/^[a-zA-Z][a-zA-Z_-0-9]*\.myshopify.com$/)) {
throw Error("Invalid extras.shop value.");
}

const authUrl = new URL(`https://${extras.shop}/admin/oauth/authorize`);
Expand Down

0 comments on commit 7d86e35

Please sign in to comment.