Function getServerSession
- getServerSession<S extends keyof SessionScopes>(
scope: S,
sessionId: string,
): Promise<null | SessionScopes[S]>Type Parameters
- S extends keyof SessionScopes
Parameters
- scope: S
Scope for session
- sessionId: string
Session id. If this session was created in HareScript, make sure it has the json:true option set
Returns Promise<null | SessionScopes[S]>
Session data or null if session has expired
Get session data
Parameters
- scope: string
Scope for session
- sessionId: string
Session id. If this session was created in HareScript, make sure it has the json:true option set
Returns Promise<null | object>
Session data or null if session has expired
- scope: string
Get session data