Setu-TS
    Preparing search index...

    Interface SessionAuthOptions

    Session authentication configuration options.

    The session payload is application data, so the framework picks no conventional key: toPrincipal is the one place that knows where an identity lives inside the payload, and it is required.

    0.1.0

    interface SessionAuthOptions {
        toPrincipal: (view: SessionView) => IPrincipal | null;
    }
    Index
    toPrincipal: (view: SessionView) => IPrincipal | null

    Maps an opened session to the principal it carries. Return null when the session holds no identity — the strategy chain then continues.

    Synchronous and session-only, so it cannot re-check the account on each request. For that, record the principal through signIn: { providers: [] } and configure refreshPrincipal and sessionStamp.