MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / readUserEmail

Function readUserEmail

apps/cli/src/device-login.ts:72–78  ·  view source on GitHub ↗
(body: Record<string, unknown>)

Source from the content-addressed store, hash-verified

70
71/** Pull `user.email` out of a token response (WorkOS returns the user inline). */
72const readUserEmail = (body: Record<string, unknown>): string | undefined => {
73 const user = body.user;
74 if (user && typeof user === "object" && "email" in user) {
75 return asString((user as { email?: unknown }).email);
76 }
77 return undefined;
78};
79
80/**
81 * Decode a JWT access token's claims WITHOUT verifying it. The CLI only uses

Callers 1

pollForDeviceTokensFunction · 0.85

Calls 1

asStringFunction · 0.85

Tested by

no test coverage detected