You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs-shopify.dev/commands/store-auth.doc.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,9 @@ import {ReferenceEntityTemplateSchema} from '@shopify/generate-docs'
3
3
4
4
constdata: ReferenceEntityTemplateSchema={
5
5
name: 'store auth',
6
-
description: `Starts a PKCE OAuth flow against the specified store and stores an online access token for later use by \`shopify store execute\`.
6
+
description: `Authenticates the app against the specified store for store commands and stores an online access token for later reuse.
7
7
8
-
This flow authenticates the app on behalf of the current user. Re-run this command if the stored token is missing, expires, or no longer has the scopes you need.`,
8
+
Re-run this command if the stored token is missing, expires, or no longer has the scopes you need.`,
9
9
overviewPreviewDescription: `Authenticate an app against a store for store commands.`,
Copy file name to clipboardExpand all lines: docs-shopify.dev/generated/generated_docs_data.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5776,7 +5776,7 @@
5776
5776
},
5777
5777
{
5778
5778
"name": "store auth",
5779
-
"description": "Starts a PKCE OAuth flow against the specified store and stores an online access token for later use by `shopify store execute`.\n\nThis flow authenticates the app on behalf of the current user. Re-run this command if the stored token is missing, expires, or no longer has the scopes you need.",
5779
+
"description": "Authenticates the app against the specified store for store commands and stores an online access token for later reuse.\n\nRe-run this command if the stored token is missing, expires, or no longer has the scopes you need.",
5780
5780
"overviewPreviewDescription": "Authenticate an app against a store for store commands.",
Copy file name to clipboardExpand all lines: packages/cli/oclif.manifest.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -5739,8 +5739,8 @@
5739
5739
],
5740
5740
"args": {
5741
5741
},
5742
-
"description": "Starts a PKCE OAuth flow against the specified store and stores an online access token for later use by `shopify store execute`.\n\nThis flow authenticates the app on behalf of the current user. Re-run this command if the stored token is missing, expires, or no longer has the scopes you need.",
5743
-
"descriptionWithMarkdown": "Starts a PKCE OAuth flow against the specified store and stores an online access token for later use by `shopify store execute`.\n\nThis flow authenticates the app on behalf of the current user. Re-run this command if the stored token is missing, expires, or no longer has the scopes you need.",
5742
+
"description": "Authenticates the app against the specified store for store commands and stores an online access token for later reuse.\n\nRe-run this command if the stored token is missing, expires, or no longer has the scopes you need.",
5743
+
"descriptionWithMarkdown": "Authenticates the app against the specified store for store commands and stores an online access token for later reuse.\n\nRe-run this command if the stored token is missing, expires, or no longer has the scopes you need.",
Copy file name to clipboardExpand all lines: packages/cli/src/cli/commands/store/auth.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,9 @@ import {authenticateStoreWithApp} from '../../services/store/auth.js'
7
7
exportdefaultclassStoreAuthextendsCommand{
8
8
staticsummary='Authenticate an app against a store for store commands.'
9
9
10
-
staticdescriptionWithMarkdown=`Starts a PKCE OAuth flow against the specified store and stores an online access token for later use by \`shopify store execute\`.
10
+
staticdescriptionWithMarkdown=`Authenticates the app against the specified store for store commands and stores an online access token for later reuse.
11
11
12
-
This flow authenticates the app on behalf of the current user. Re-run this command if the stored token is missing, expires, or no longer has the scopes you need.`
12
+
Re-run this command if the stored token is missing, expires, or no longer has the scopes you need.`
`Run ${outputToken.genericShellCommand(`shopify store auth --store ${session.store} --scopes ${session.scopes.join(',')}`).value} to re-authenticate.`,
26
-
)
24
+
throwreauthenticateStoreAuthError(`No refresh token stored for ${session.store}.`,session.store,session.scopes.join(','))
`Token refresh failed for ${session.store} (HTTP ${response.status}).`,
54
-
`Run ${outputToken.genericShellCommand(`shopify store auth --store ${session.store} --scopes ${session.scopes.join(',')}`).value} to re-authenticate.`,
52
+
session.store,
53
+
session.scopes.join(','),
55
54
)
56
55
}
57
56
@@ -65,9 +64,10 @@ async function refreshStoreToken(session: StoredStoreAppSession): Promise<Stored
`Token refresh returned an invalid response for ${session.store}.`,
70
-
`Run ${outputToken.genericShellCommand(`shopify store auth --store ${session.store} --scopes ${session.scopes.join(',')}`).value} to re-authenticate.`,
69
+
session.store,
70
+
session.scopes.join(','),
71
71
)
72
72
}
73
73
@@ -97,10 +97,7 @@ async function loadStoredStoreSession(store: string): Promise<StoredStoreAppSess
97
97
letsession=getStoredStoreAppSession(store)
98
98
99
99
if(!session){
100
-
thrownewAbortError(
101
-
`No stored app authentication found for ${store}.`,
102
-
`Run ${outputToken.genericShellCommand(`shopify store auth --store ${store} --scopes <comma-separated-scopes>`).value} to create stored auth for this store.`,
103
-
)
100
+
throwcreateStoredStoreAuthError(store)
104
101
}
105
102
106
103
outputDebug(
@@ -133,9 +130,10 @@ async function resolveApiVersion(options: {
`Stored app authentication for ${session.store} is no longer valid.`,
138
-
`Run ${outputToken.genericShellCommand(`shopify store auth --store ${session.store} --scopes ${session.scopes.join(',')}`).value} to re-authenticate.`,
0 commit comments