revalidateSocketSession
revalidateSocketSession(
socket,options):Promise<RevalidationOutcome>
Re-run the cheap parts of the auth validator for an already-connected socket:
- JWT sockets (
decodedToken.authKind === "jwt"): verifyexplocally (no signature re-check — a stolen-but-still-valid token is not this sweep's job; revocation-by-expiry and disablement are). - Better Auth sockets (
decodedToken.authKind === "better-auth"): re-runauth.api.getSessionfor the retained session token. Also reloads the user'sdisabledflag (and the full user document, refreshingsocket.data.fullUserfor D2) when auserModelis configured.
Parameters
socket
options
Returns
Promise<RevalidationOutcome>