Options
All
  • Public
  • Public/Protected
  • All
Menu

These are the SDK reference docs. If you’re looking for docs to implement SuperTokens, you might want to check out the User Guides

Module recipe/session

Index

Type aliases

APIOptions

APIOptions: { config: TypeNormalisedInput; isInServerlessEnv: boolean; recipeId: string; recipeImplementation: RecipeInterface; req: BaseRequest; res: BaseResponse }

Type declaration

SessionInformation

SessionInformation: { accessTokenPayload: any; expiry: number; sessionData: any; sessionHandle: string; timeCreated: number; userId: string }

Type declaration

  • accessTokenPayload: any
  • expiry: number
  • sessionData: any
  • sessionHandle: string
  • timeCreated: number
  • userId: string

Variables

Error

Error: typeof default = ...

Functions

createNewSession

  • createNewSession(res: any, userId: string, accessTokenPayload?: any, sessionData?: any): Promise<SessionContainer>

getAllSessionHandlesForUser

  • getAllSessionHandlesForUser(userId: string): Promise<string[]>

getSession

getSessionInformation

init

  • init(config?: TypeInput): RecipeListFunction

refreshSession

revokeAllSessionsForUser

  • revokeAllSessionsForUser(userId: string): Promise<string[]>

revokeMultipleSessions

  • revokeMultipleSessions(sessionHandles: string[]): Promise<string[]>

revokeSession

  • revokeSession(sessionHandle: string): Promise<boolean>

updateAccessTokenPayload

  • updateAccessTokenPayload(sessionHandle: string, newAccessTokenPayload: any): Promise<void>

updateSessionData

  • updateSessionData(sessionHandle: string, newSessionData: any): Promise<void>

Generated using TypeDoc