Skip to main content

Function: isPaperSessionValid()

isPaperSessionValid(paperDid, maxAgeMs): boolean

Defined in: web/lib/auth/paper-session.ts:206

Check if a paper session is still valid.

Parameters​

paperDid​

string

Paper account DID

maxAgeMs​

number = 3600000

Maximum session age in milliseconds (default: 1 hour)

Returns​

boolean

True if session exists and is not expired

Remarks​

Sessions older than maxAgeMs are considered invalid. Default is 1 hour, which is conservative for ATProto OAuth tokens.