Skip to content

Commit 7d86e35

Browse files
committed
fix: shopify shop validation
1 parent 5f695f3 commit 7d86e35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

handshake/src/providers/shopify.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@ export const Shopify: HandlerFactory<Args, ShopifyAppCredential> = ({
244244
}
245245

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

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

0 commit comments

Comments
 (0)