@auth0/nextjs-auth0 - v4.19.0
    Preparing search index...

    Interface SessionDataStore

    Interface for a custom session data store.

    TTL contract: every successful write method (set, update) must reset the session TTL/expiry so that active sessions are not silently expired between requests.

    interface SessionDataStore {
        delete(id: string): Promise<void>;
        deleteByLogoutToken?(logoutToken: LogoutToken): Promise<void>;
        get(id: string): Promise<SessionData | null>;
        set(id: string, session: SessionData): Promise<void>;
        update?(id: string, session: SessionData): Promise<boolean>;
    }
    Index

    Methods

    • Destroys the session with the given session ID.

      Parameters

      • id: string

      Returns Promise<void>

    • Deletes the session with the given logout token which may contain a session ID or a user ID, or both.

      MCD resolver mode: When using multiple custom domains with a domain resolver, implementations MUST filter on the iss field in addition to sub/sid to ensure sessions are only deleted for the matching issuer. Custom domains on the same tenant share signing keys, so failing to filter on iss allows a logout token from one domain to delete sessions created by a different domain.

      Parameters

      Returns Promise<void>

    • Optional: update the session by its ID only if it already exists. Return true if updated, false if not found.

      Parameters

      Returns Promise<boolean>