MCPcopy
hub / github.com/claude-code-best/claude-code / getEmailAsync

Function getEmailAsync

src/utils/user.ts:162–179  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

160}
161
162async function getEmailAsync(): Promise<string | undefined> {
163 // Only include OAuth email when actively using OAuth authentication
164 const oauthAccount = getOauthAccountInfo()
165 if (oauthAccount?.emailAddress) {
166 return oauthAccount.emailAddress
167 }
168
169 // Ant-only fallbacks below
170 if (process.env.USER_TYPE !== 'ant') {
171 return undefined
172 }
173
174 if (process.env.COO_CREATOR) {
175 return `${process.env.COO_CREATOR}@anthropic.com`
176 }
177
178 return getGitEmail()
179}
180
181/**
182 * Get the user's git email from `git config user.email`.

Callers 1

initUserFunction · 0.85

Calls 1

getOauthAccountInfoFunction · 0.70

Tested by

no test coverage detected