Skip to content

Add selected account details to auth login - #8794

Closed
isaacroldan wants to merge 1 commit into
codex/json-auth-loginfrom
codex/session-account-details
Closed

isaacroldan wants to merge 1 commit into
codex/json-auth-loginfrom
codex/session-account-details

Conversation

@isaacroldan

@isaacroldan isaacroldan commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

An account alias alone does not identify the Shopify user or their email.

WHAT is this pull request doing?

Add SelectedSession and a details API while keeping the alias-only API. Store email from existing authentication requests and retain it for the correct user during refresh and reauthentication. Extend the login JSON result from #8791 with userId and email; unknown email is null.

Validation: 41 auth tests, 112 session tests, lint, types and build pass. Prompt stream handling is excluded from this stack.

If #8791 is released separately first, the added JSON fields require a major CLI changeset for consumers with the old strict schema.

How to manually test your changes?

Use this PR's CLI or snapshot. Replace <account-alias> with a stored alias.

shopify auth login --alias "<account-alias>" --json --no-input

Expect status, userId, alias and email for the selected account. Older sessions can return email: null. Run shopify auth login without JSON to complete a fresh sign-in, then repeat the alias-based JSON command in a new process. The email must be returned when available and remain stored.

Select by a stored user ID to check that the email belongs to that account. Without JSON, the account message and selection behavior must stay the same.

Checklist

  • Cross-platform impacts
  • Documentation impacts
  • Analytics impacts
  • Minor changeset

Stack: #8790: logout JSON → #8791: login JSON → #8794: account details. Merge in this order.

@isaacroldan
isaacroldan requested a review from a team as a code owner October 6, 2026 11:49
@github-actions github-actions Bot added the Area: @shopify/cli @shopify/cli package issues label Oct 6, 2026
@isaacroldan
isaacroldan added this pull request to stack #8795 October 6, 2026 11:51
@isaacroldan

Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

🫰✨ Thanks @isaacroldan! Your snapshot has been published to npm.

Built from fdab1a67dc5f9ad8618c8872148b5b09506a237b. Workflow run.

Test the snapshot by installing your package globally:

pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20261006115510

Caution

After installing, validate the version by running shopify version in your terminal.
If the versions don't match, you might have multiple global instances installed.
Use which shopify to find out which one you are running and uninstall it.

@isaacroldan
isaacroldan force-pushed the codex/session-account-details branch from fdab1a6 to 08495a7 Compare October 6, 2026 12:09
@isaacroldan

Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

🫰✨ Thanks @isaacroldan! Your snapshot has been published to npm.

Built from 08495a7de68235f3bfd7c881ab58a0fe3d6d9356. Workflow run.

Test the snapshot by installing your package globally:

pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20261006121130

Caution

After installing, validate the version by running shopify version in your terminal.
If the versions don't match, you might have multiple global instances installed.
Use which shopify to find out which one you are running and uninstall it.

@isaacroldan
isaacroldan removed this pull request from stack #8795 October 6, 2026 15:08
@isaacroldan
isaacroldan force-pushed the codex/session-account-details branch from 08495a7 to 1f386df Compare October 6, 2026 15:09
@isaacroldan
isaacroldan requested a review from a team as a code owner October 6, 2026 15:09
@isaacroldan isaacroldan changed the title Add selected account details to session selection Add selected account details to auth login Oct 6, 2026
@isaacroldan
isaacroldan changed the base branch from main to codex/json-auth-login October 6, 2026 15:10
@isaacroldan
isaacroldan added this pull request to stack #8802 October 6, 2026 15:10
@isaacroldan

Copy link
Copy Markdown
Contributor Author

/snapit

@isaacroldan
isaacroldan force-pushed the codex/session-account-details branch from 1f386df to 99a3d98 Compare October 6, 2026 16:56
@isaacroldan

Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

🫰✨ Thanks @isaacroldan! Your snapshot has been published to npm.

Built from 99a3d98b512423aa2bb5867c85d24b5513aeddea. Workflow run.

Test the snapshot by installing your package globally:

pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20261006165742

Caution

After installing, validate the version by running shopify version in your terminal.
If the versions don't match, you might have multiple global instances installed.
Use which shopify to find out which one you are running and uninstall it.

@isaacroldan
isaacroldan force-pushed the codex/session-account-details branch from 99a3d98 to 4b5a8ab Compare October 7, 2026 09:09
@isaacroldan

Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

🫰✨ Thanks @isaacroldan! Your snapshot has been published to npm.

Built from 4b5a8abc8f4f29ff06f2e7af1ce1c2a2d8a8b79b. Workflow run.

Test the snapshot by installing your package globally:

pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20261007091213

Caution

After installing, validate the version by running shopify version in your terminal.
If the versions don't match, you might have multiple global instances installed.
Use which shopify to find out which one you are running and uninstall it.

@isaacroldan
isaacroldan force-pushed the codex/session-account-details branch from 4b5a8ab to 3329861 Compare October 7, 2026 09:44
@isaacroldan

Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Differences in type declarations

We detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

We found no new type declarations in this PR

Existing type declarations

packages/cli-kit/dist/public/node/session-prompt.d.ts
@@ -1,3 +1,12 @@
+/** Public account details for a selected Shopify identity session. */
+export interface SelectedSession {
+    /** The identity provider user ID. */
+    userId: string;
+    /** The alias or display label used to select the account. */
+    alias: string;
+    /** The email returned by authentication, or null when it is not stored. */
+    email: string | null;
+}
 /**
  * Prompts the user to select from existing sessions or log in with a different account.
  *
@@ -7,4 +16,11 @@
  * @param alias - Optional alias of the account to switch to.
  * @returns Promise with the alias of the chosen session.
  */
-export declare function promptSessionSelect(alias?: string): Promise<string>;
\ No newline at end of file
+export declare function promptSessionSelect(alias?: string): Promise<string>;
+/**
+ * Selects an existing session or authenticates a new account and returns its public details.
+ *
+ * @param alias - Optional alias or user ID of an account to select.
+ * @returns The selected user ID, display alias, and stored email without credentials.
+ */
+export declare function promptSessionSelectWithDetails(alias?: string): Promise<SelectedSession>;
\ No newline at end of file
packages/cli-kit/dist/private/node/session/schema.d.ts
@@ -9,6 +9,7 @@ declare const IdentityTokenSchema: zod.ZodObject<{
     scopes: zod.ZodArray<zod.ZodString, "many">;
     userId: zod.ZodString;
     alias: zod.ZodOptional<zod.ZodString>;
+    email: zod.ZodOptional<zod.ZodString>;
 }, "strip", zod.ZodTypeAny, {
     accessToken: string;
     refreshToken: string;
@@ -16,6 +17,7 @@ declare const IdentityTokenSchema: zod.ZodObject<{
     expiresAt: Date;
     userId: string;
     alias?: string | undefined;
+    email?: string | undefined;
 }, {
     accessToken: string;
     refreshToken: string;
@@ -23,6 +25,7 @@ declare const IdentityTokenSchema: zod.ZodObject<{
     userId: string;
     expiresAt?: unknown;
     alias?: string | undefined;
+    email?: string | undefined;
 }>;
 /**
  * The schema represents an application token.
@@ -51,6 +54,7 @@ declare const SessionSchema: zod.ZodObject<{
         scopes: zod.ZodArray<zod.ZodString, "many">;
         userId: zod.ZodString;
         alias: zod.ZodOptional<zod.ZodString>;
+        email: zod.ZodOptional<zod.ZodString>;
     }, "strip", zod.ZodTypeAny, {
         accessToken: string;
         refreshToken: string;
@@ -58,6 +62,7 @@ declare const SessionSchema: zod.ZodObject<{
         expiresAt: Date;
         userId: string;
         alias?: string | undefined;
+        email?: string | undefined;
     }, {
         accessToken: string;
         refreshToken: string;
@@ -65,6 +70,7 @@ declare const SessionSchema: zod.ZodObject<{
         userId: string;
         expiresAt?: unknown;
         alias?: string | undefined;
+        email?: string | undefined;
     }>;
     applications: zod.ZodObject<{}, "strip", zod.ZodObject<{
         accessToken: zod.ZodString;
@@ -120,6 +126,7 @@ declare const SessionSchema: zod.ZodObject<{
         expiresAt: Date;
         userId: string;
         alias?: string | undefined;
+        email?: string | undefined;
     };
     applications: {} & {
         [k: string]: {
@@ -137,6 +144,7 @@ declare const SessionSchema: zod.ZodObject<{
         userId: string;
         expiresAt?: unknown;
         alias?: string | undefined;
+        email?: string | undefined;
     };
     applications: {} & {
         [k: string]: {
@@ -183,6 +191,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         scopes: zod.ZodArray<zod.ZodString, "many">;
         userId: zod.ZodString;
         alias: zod.ZodOptional<zod.ZodString>;
+        email: zod.ZodOptional<zod.ZodString>;
     }, "strip", zod.ZodTypeAny, {
         accessToken: string;
         refreshToken: string;
@@ -190,6 +199,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         expiresAt: Date;
         userId: string;
         alias?: string | undefined;
+        email?: string | undefined;
     }, {
         accessToken: string;
         refreshToken: string;
@@ -197,6 +207,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         userId: string;
         expiresAt?: unknown;
         alias?: string | undefined;
+        email?: string | undefined;
     }>;
     applications: zod.ZodObject<{}, "strip", zod.ZodObject<{
         accessToken: zod.ZodString;
@@ -252,6 +263,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         expiresAt: Date;
         userId: string;
         alias?: string | undefined;
+        email?: string | undefined;
     };
     applications: {} & {
         [k: string]: {
@@ -269,6 +281,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         userId: string;
         expiresAt?: unknown;
         alias?: string | undefined;
+        email?: string | undefined;
     };
     applications: {} & {
         [k: string]: {
@@ -286,6 +299,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         scopes: zod.ZodArray<zod.ZodString, "many">;
         userId: zod.ZodString;
         alias: zod.ZodOptional<zod.ZodString>;
+        email: zod.ZodOptional<zod.ZodString>;
     }, "strip", zod.ZodTypeAny, {
         accessToken: string;
         refreshToken: string;
@@ -293,6 +307,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         expiresAt: Date;
         userId: string;
         alias?: string | undefined;
+        email?: string | undefined;
     }, {
         accessToken: string;
         refreshToken: string;
@@ -300,6 +315,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         userId: string;
         expiresAt?: unknown;
         alias?: string | undefined;
+        email?: string | undefined;
     }>;
     applications: zod.ZodObject<{}, "strip", zod.ZodObject<{
         accessToken: zod.ZodString;
@@ -355,6 +371,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         expiresAt: Date;
         userId: string;
         alias?: string | undefined;
+        email?: string | undefined;
     };
     applications: {} & {
         [k: string]: {
@@ -372,6 +389,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         userId: string;
         expiresAt?: unknown;
         alias?: string | undefined;
+        email?: string | undefined;
     };
     applications: {} & {
         [k: string]: {
@@ -389,6 +407,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         scopes: zod.ZodArray<zod.ZodString, "many">;
         userId: zod.ZodString;
         alias: zod.ZodOptional<zod.ZodString>;
+        email: zod.ZodOptional<zod.ZodString>;
     }, "strip", zod.ZodTypeAny, {
         accessToken: string;
         refreshToken: string;
@@ -396,6 +415,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         expiresAt: Date;
         userId: string;
         alias?: string | undefined;
+        email?: string | undefined;
     }, {
         accessToken: string;
         refreshToken: string;
@@ -403,6 +423,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         userId: string;
         expiresAt?: unknown;
         alias?: string | undefined;
+        email?: string | undefined;
     }>;
     applications: zod.ZodObject<{}, "strip", zod.ZodObject<{
         accessToken: zod.ZodString;
@@ -458,6 +479,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         expiresAt: Date;
         userId: string;
         alias?: string | undefined;
+        email?: string | undefined;
     };
     applications: {} & {
         [k: string]: {
@@ -475,6 +497,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         userId: string;
         expiresAt?: unknown;
         alias?: string | undefined;
+        email?: string | undefined;
     };
     applications: {} & {
         [k: string]: {
@@ -492,6 +515,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         scopes: zod.ZodArray<zod.ZodString, "many">;
         userId: zod.ZodString;
         alias: zod.ZodOptional<zod.ZodString>;
+        email: zod.ZodOptional<zod.ZodString>;
     }, "strip", zod.ZodTypeAny, {
         accessToken: string;
         refreshToken: string;
@@ -499,6 +523,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         expiresAt: Date;
         userId: string;
         alias?: string | undefined;
+        email?: string | undefined;
     }, {
         accessToken: string;
         refreshToken: string;
@@ -506,6 +531,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         userId: string;
         expiresAt?: unknown;
         alias?: string | undefined;
+        email?: string | undefined;
     }>;
     applications: zod.ZodObject<{}, "strip", zod.ZodObject<{
         accessToken: zod.ZodString;
@@ -561,6 +587,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         expiresAt: Date;
         userId: string;
         alias?: string | undefined;
+        email?: string | undefined;
     };
     applications: {} & {
         [k: string]: {
@@ -578,6 +605,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         userId: string;
         expiresAt?: unknown;
         alias?: string | undefined;
+        email?: string | undefined;
     };
     applications: {} & {
         [k: string]: {
@@ -595,6 +623,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         scopes: zod.ZodArray<zod.ZodString, "many">;
         userId: zod.ZodString;
         alias: zod.ZodOptional<zod.ZodString>;
+        email: zod.ZodOptional<zod.ZodString>;
     }, "strip", zod.ZodTypeAny, {
         accessToken: string;
         refreshToken: string;
@@ -602,6 +631,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         expiresAt: Date;
         userId: string;
         alias?: string | undefined;
+        email?: string | undefined;
     }, {
         accessToken: string;
         refreshToken: string;
@@ -609,6 +639,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         userId: string;
         expiresAt?: unknown;
         alias?: string | undefined;
+        email?: string | undefined;
     }>;
     applications: zod.ZodObject<{}, "strip", zod.ZodObject<{
         accessToken: zod.ZodString;
@@ -664,6 +695,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         expiresAt: Date;
         userId: string;
         alias?: string | undefined;
+        email?: string | undefined;
     };
     applications: {} & {
         [k: string]: {
@@ -681,6 +713,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         userId: string;
         expiresAt?: unknown;
         alias?: string | undefined;
+        email?: string | undefined;
     };
     applications: {} & {
         [k: string]: {
@@ -698,6 +731,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         scopes: zod.ZodArray<zod.ZodString, "many">;
         userId: zod.ZodString;
         alias: zod.ZodOptional<zod.ZodString>;
+        email: zod.ZodOptional<zod.ZodString>;
     }, "strip", zod.ZodTypeAny, {
         accessToken: string;
         refreshToken: string;
@@ -705,6 +739,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         expiresAt: Date;
         userId: string;
         alias?: string | undefined;
+        email?: string | undefined;
     }, {
         accessToken: string;
         refreshToken: string;
@@ -712,6 +747,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         userId: string;
         expiresAt?: unknown;
         alias?: string | undefined;
+        email?: string | undefined;
     }>;
     applications: zod.ZodObject<{}, "strip", zod.ZodObject<{
         accessToken: zod.ZodString;
@@ -767,6 +803,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         expiresAt: Date;
         userId: string;
         alias?: string | undefined;
+        email?: string | undefined;
     };
     applications: {} & {
         [k: string]: {
@@ -784,6 +821,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         userId: string;
         expiresAt?: unknown;
         alias?: string | undefined;
+        email?: string | undefined;
     };
     applications: {} & {
         [k: string]: {
@@ -801,6 +839,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         scopes: zod.ZodArray<zod.ZodString, "many">;
         userId: zod.ZodString;
         alias: zod.ZodOptional<zod.ZodString>;
+        email: zod.ZodOptional<zod.ZodString>;
     }, "strip", zod.ZodTypeAny, {
         accessToken: string;
         refreshToken: string;
@@ -808,6 +847,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         expiresAt: Date;
         userId: string;
         alias?: string | undefined;
+        email?: string | undefined;
     }, {
         accessToken: string;
         refreshToken: string;
@@ -815,6 +855,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         userId: string;
         expiresAt?: unknown;
         alias?: string | undefined;
+        email?: string | undefined;
     }>;
     applications: zod.ZodObject<{}, "strip", zod.ZodObject<{
         accessToken: zod.ZodString;
@@ -870,6 +911,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         expiresAt: Date;
         userId: string;
         alias?: string | undefined;
+        email?: string | undefined;
     };
     applications: {} & {
         [k: string]: {
@@ -887,6 +929,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         userId: string;
         expiresAt?: unknown;
         alias?: string | undefined;
+        email?: string | undefined;
     };
     applications: {} & {
         [k: string]: {
@@ -904,6 +947,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         scopes: zod.ZodArray<zod.ZodString, "many">;
         userId: zod.ZodString;
         alias: zod.ZodOptional<zod.ZodString>;
+        email: zod.ZodOptional<zod.ZodString>;
     }, "strip", zod.ZodTypeAny, {
         accessToken: string;
         refreshToken: string;
@@ -911,6 +955,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         expiresAt: Date;
         userId: string;
         alias?: string | undefined;
+        email?: string | undefined;
     }, {
         accessToken: string;
         refreshToken: string;
@@ -918,6 +963,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         userId: string;
         expiresAt?: unknown;
         alias?: string | undefined;
+        email?: string | undefined;
     }>;
     applications: zod.ZodObject<{}, "strip", zod.ZodObject<{
         accessToken: zod.ZodString;
@@ -973,6 +1019,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         expiresAt: Date;
         userId: string;
         alias?: string | undefined;
+        email?: string | undefined;
     };
     applications: {} & {
         [k: string]: {
@@ -990,6 +1037,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         userId: string;
         expiresAt?: unknown;
         alias?: string | undefined;
+        email?: string | undefined;
     };
     applications: {} & {
         [k: string]: {
@@ -1007,6 +1055,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         scopes: zod.ZodArray<zod.ZodString, "many">;
         userId: zod.ZodString;
         alias: zod.ZodOptional<zod.ZodString>;
+        email: zod.ZodOptional<zod.ZodString>;
     }, "strip", zod.ZodTypeAny, {
         accessToken: string;
         refreshToken: string;
@@ -1014,6 +1063,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         expiresAt: Date;
         userId: string;
         alias?: string | undefined;
+        email?: string | undefined;
     }, {
         accessToken: string;
         refreshToken: string;
@@ -1021,6 +1071,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         userId: string;
         expiresAt?: unknown;
         alias?: string | undefined;
+        email?: string | undefined;
     }>;
     applications: zod.ZodObject<{}, "strip", zod.ZodObject<{
         accessToken: zod.ZodString;
@@ -1076,6 +1127,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         expiresAt: Date;
         userId: string;
         alias?: string | undefined;
+        email?: string | undefined;
     };
     applications: {} & {
         [k: string]: {
@@ -1093,6 +1145,7 @@ export declare const SessionsSchema: zod.ZodObject<{}, "strip", zod.ZodObject<{}
         userId: string;
         expiresAt?: unknown;
         alias?: string | undefined;
+        email?: string | undefined;
     };
     applications: {} & {
         [k: string]: {
packages/cli-kit/dist/private/node/session/store.d.ts
@@ -1,4 +1,5 @@
-import type { Sessions } from './schema.js';
+import type { IdentityToken, Sessions } from './schema.js';
+type SessionAccount = Pick<IdentityToken, 'userId' | 'alias' | 'email'>;
 /**
  * Serializes the session as a JSON and stores it in the system.
  * @param session - the session to store.
@@ -15,12 +16,12 @@ export declare function fetch(): Promise<Sessions | undefined>;
  */
 export declare function remove(): Promise<void>;
 /**
- * Gets the session alias for a given user ID.
+ * Gets public account details for a stored user ID.
  *
- * @param userId - The user ID of the session to get the alias for.
- * @returns The alias for the session if it exists, otherwise undefined.
+ * @param userId - The stored user ID whose account details are requested.
+ * @returns The account details if the session exists, otherwise undefined.
  */
-export declare function getSessionAlias(userId: string): Promise<string | undefined>;
+export declare function getSessionAccount(userId: string): Promise<SessionAccount | undefined>;
 /**
  * Sets the alias for a given user's session and persists it.
  *
@@ -34,4 +35,6 @@ export declare function setSessionAlias(userId: string, alias: string): Promise<
  * @param alias - The alias to search for
  * @returns The user ID if found, otherwise undefined
  */
-export declare function findSessionByAlias(alias: string): Promise<string | undefined>;
\ No newline at end of file
+export declare function findSessionByAlias(alias: string): Promise<string | undefined>;
+export declare function findSessionAccountByAlias(alias: string): Promise<SessionAccount | undefined>;
+export {};
\ No newline at end of file

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

🫰✨ Thanks @isaacroldan! Your snapshot has been published to npm.

Built from 3329861bcd1c4f9fb9264271788fc2b0d2a19e40. Workflow run.

Test the snapshot by installing your package globally:

pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20261007094639

Caution

After installing, validate the version by running shopify version in your terminal.
If the versions don't match, you might have multiple global instances installed.
Use which shopify to find out which one you are running and uninstall it.

@isaacroldan
isaacroldan marked this pull request as draft October 7, 2026 09:50
@isaacroldan isaacroldan closed this Oct 7, 2026
An error occurred while trying to automatically change base from codex/json-auth-login to main October 7, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: @shopify/cli @shopify/cli package issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant