Interface SessionStorage

Interface storage adapters should implement.

Storage adapters are responsible for persisting Sessions and can optionally be passed to the SessionKit constructor to auto-persist sessions.

Hierarchy

  • SessionStorage

Implemented by

Methods

Methods

  • Read key from storage. Should return null if key can not be found.

    Parameters

    • key: string

    Returns Promise<null | string>

  • Delete key from storage. Should not error if deleting non-existing key.

    Parameters

    • key: string

    Returns Promise<void>

  • Write string to storage at key. Should overwrite existing values without error.

    Parameters

    • key: string
    • data: string

    Returns Promise<void>