createServerSession | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...

    Function createServerSession

    • Create a new session

      Type Parameters

      • S extends string

      Parameters

      • scope: S

        Scope for session (must be unique for each createServerSession usage so users can't try to trick other getServerSession users to reveal data)

      • data: S extends keyof SessionScopes ? SessionScopes[S<S>] : object

        Data to store (needs to be serializable to typed JSON)

      • Optionaloptions: SessionOptions

      Returns Promise<string>

      Session id (base64url encoded string)