diff --git a/packages/store/src/cli/services/store/auth/callback.ts b/packages/store/src/cli/services/store/auth/callback.ts index 4e3735da45..a94d8d39e4 100644 --- a/packages/store/src/cli/services/store/auth/callback.ts +++ b/packages/store/src/cli/services/store/auth/callback.ts @@ -18,20 +18,77 @@ function renderAuthCallbackPage(title: string, message: string): string { const safeTitle = title.replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"') const safeMessage = message.replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"') + // Shopify bag icon SVG — same asset used by accounts.shopify.com/activate + const shopifyLogo = `` + return ` ${safeTitle} + - -
-
-

${safeTitle}

-

${safeMessage}

-
-
+ +
+
${shopifyLogo}
+
+

${safeTitle}

+

${safeMessage}

+
+
` } @@ -78,7 +135,7 @@ export async function waitForStoreAuthCode({ outputDebug(outputContent`Received OAuth callback for shop ${outputToken.raw(returnedStore ?? 'unknown')}`) if (!returnedStore) { - fail('OAuth callback store does not match the requested store.') + fail('OAuth callback store doesn\'t match the requested store') return } @@ -90,7 +147,7 @@ export async function waitForStoreAuthCode({ const returnedState = searchParams.get('state') if (!returnedState || !constantTimeEqual(returnedState, state)) { - fail('OAuth callback state does not match the original request.') + fail('OAuth callback state doesn\'t match the original request') return } @@ -102,7 +159,7 @@ export async function waitForStoreAuthCode({ const code = searchParams.get('code') if (!code) { - fail('OAuth callback did not include an authorization code.') + fail('OAuth callback didn\'t include an authorization code') return } @@ -113,7 +170,7 @@ export async function waitForStoreAuthCode({ res.setHeader('Connection', 'close') res.once('finish', () => settle(() => resolve(code))) res.end( - renderAuthCallbackPage('Authentication succeeded', 'You can close this window and return to the terminal.'), + renderAuthCallbackPage('Authentication succeeded', 'Close this window and return to the terminal'), ) })