MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / getEmailAsync

Function getEmailAsync

source code/utils/user.ts:164–181  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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