MCPcopy Index your code
hub / github.com/freecodexyz/free-code / isCodexSubscriber

Function isCodexSubscriber

src/utils/auth.ts:1629–1638  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1627}
1628
1629export function isCodexSubscriber(): boolean {
1630 // Only treat as Codex subscriber when explicitly using OpenAI provider
1631 if (getAPIProvider() !== 'openai') {
1632 return false
1633 }
1634
1635 // Verify we actually have valid Codex tokens
1636 const tokens = getCodexOAuthTokens()
1637 return !!tokens?.accessToken
1638}
1639
1640/**
1641 * Check if the current OAuth token has the user:profile scope.

Callers 7

getLogoDisplayDataFunction · 0.85
getModelOptionsBaseFunction · 0.85
validateModelFunction · 0.85
getAnthropicClientFunction · 0.85
useApiKeyVerificationFunction · 0.85

Calls 2

getAPIProviderFunction · 0.85
getCodexOAuthTokensFunction · 0.85

Tested by

no test coverage detected