Session Storages
The built-in session storages generally provide the following attributes:
- uid:
string
(Default:null
)
A unique identifier indicating the active user.
- created:
number
(Default: )
The numeric timestamp of when the session was created.
Arbitrary data to persisted in the session.
storage.new(): Session
Examples
storage.fromClient(sid): Session | null
Resolves or deserializes a session identifier to a session object.
Arguments
- sid:
Session identifier to resolve or deserialize.
Examples
storage.forClient(session): string | null
Derives a session identifier from the given session object.
Arguments
- session:
Session
Session to derive a session identifier from.
Examples