MCPcopy Create free account
hub / github.com/AntiHub-Project/AntiHub / getTokenExpiresAt

Function getTokenExpiresAt

lib/api.ts:556–560  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

554 * 获取 token 过期时间
555 */
556export function getTokenExpiresAt(): number | null {
557 if (typeof window === 'undefined') return null;
558 const expiresAt = localStorage.getItem('token_expires_at');
559 return expiresAt ? parseInt(expiresAt, 10) : null;
560}
561
562/**
563 * 检查 token 是否即将过期(默认 5 分钟内)

Callers 2

isTokenExpiringSoonFunction · 0.85
scheduleRefreshFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected