MCPcopy Create free account
hub / github.com/Noumena-Network/code / getManagedOAuthState

Function getManagedOAuthState

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

Source from the content-addressed store, hash-verified

183export type ManagedOAuthState = 'none' | 'usable' | 'expired'
184
185export function getManagedOAuthState(): ManagedOAuthState {
186 if (!isAnthropicAuthEnabled()) {
187 return 'none'
188 }
189
190 const oauthTokens = getClaudeAIOAuthTokens()
191 if (!oauthTokens?.accessToken || !shouldUseClaudeAIAuth(oauthTokens.scopes)) {
192 return 'none'
193 }
194
195 return getUsableClaudeAiAccessToken() ? 'usable' : 'expired'
196}
197
198export function getAuthTokenSource() {
199 // --bare: API-key-only. apiKeyHelper (from --settings) is the only

Callers 2

getAuthTokenSourceFunction · 0.85
getAccountInformationFunction · 0.85

Calls 3

isAnthropicAuthEnabledFunction · 0.85
shouldUseClaudeAIAuthFunction · 0.85

Tested by

no test coverage detected