method SessionService.prototype.load
Since 0.2.0
SessionService.prototype.load(ctx: IRequestContext): Promise<Session>

Loads the session for a request, falling back to a fresh one whenever the cookie is absent, malformed, tampered with, expired, idle, or (on the store strategy) no longer present server-side.

Parameters

ctx: IRequestContext

The request context

Return Type

Promise<Session>

The session to serve this request with

Usage

import { SessionService } from "session-plugin/src/index.ts";