MCPcopy
hub / github.com/codeaashu/claude-code / getOAuthTokenFromFileDescriptor

Function getOAuthTokenFromFileDescriptor

src/utils/authFileDescriptor.ts:173–181  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

171 * Well-known file: /home/claude/.claude/remote/.oauth_token.
172 */
173export function getOAuthTokenFromFileDescriptor(): string | null {
174 return getCredentialFromFd({
175 envVar: 'CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR',
176 wellKnownPath: CCR_OAUTH_TOKEN_PATH,
177 label: 'OAuth token',
178 getCached: getOauthTokenFromFd,
179 setCached: setOauthTokenFromFd,
180 })
181}
182
183/**
184 * Get the CCR-injected API key. See getCredentialFromFd for FD-vs-disk

Callers 3

getAuthTokenSourceFunction · 0.85
auth.tsFile · 0.85

Calls 1

getCredentialFromFdFunction · 0.85

Tested by

no test coverage detected