MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / accessTokenExpiry

Function accessTokenExpiry

apps/cli/src/device-login.ts:102–103  ·  view source on GitHub ↗
(accessToken: string)

Source from the content-addressed store, hash-verified

100
101/** Read `exp` (epoch seconds) out of a JWT access token without verifying it. */
102export const accessTokenExpiry = (accessToken: string): number | undefined =>
103 asNumber(decodeAccessTokenClaims(accessToken)?.exp);
104
105const deriveExpiresAt = (tokens: {
106 accessToken: string;

Callers 1

deriveExpiresAtFunction · 0.85

Calls 2

asNumberFunction · 0.85
decodeAccessTokenClaimsFunction · 0.85

Tested by

no test coverage detected