API Reference — @tuwaio/siwx (CAIP-122 Authentication Layer)
deserializeCookieSession()
deserializeCookieSession(
cookieValue):SiwxSession|null
Defined in: packages/siwx-server/src/server.ts:179
Deserializes a SiwxSession from a base64url-encoded cookie value.
This is the inverse of serializeCookieSession.
Parameters
cookieValue
string
The raw cookie value string (not the full header).
Returns
SiwxSession | null
The deserialized SiwxSession, or null if the value is invalid or malformed.
Example
const session = deserializeCookieSession(request.cookies.get('siwx-session'));
if (session) console.log('Session address:', session.address);Last updated on