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

Function isOAuthTokenExpired

src/services/oauth/client.ts:344–353  ·  view source on GitHub ↗
(expiresAt: number | null)

Source from the content-addressed store, hash-verified

342}
343
344export function isOAuthTokenExpired(expiresAt: number | null): boolean {
345 if (expiresAt === null) {
346 return false
347 }
348
349 const bufferTime = 5 * 60 * 1000
350 const now = Date.now()
351 const expiresWithBuffer = now + bufferTime
352 return expiresWithBuffer >= expiresAt
353}
354
355export async function fetchProfileInfo(accessToken: string): Promise<{
356 subscriptionType: SubscriptionType | null

Callers 3

fetchUtilizationFunction · 0.85
sendBatchWithRetryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected