Function createServerSession
- createServerSession<S extends string>(
scope: S,
data: S extends keyof SessionScopes ? SessionScopes[S<S>] : object,
options?: SessionOptions,
): Promise<string>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)
Optional
options: SessionOptions
Returns Promise<string>
Session id (base64url encoded string)
Create a new session