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

References

SessionRequest

Re-exports SessionRequest

Type aliases

APIOptions

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

Type declaration

SessionInformation

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

Type declaration

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

Variables

Error

Error: typeof default = ...

Functions

createNewSession

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

getAllSessionHandlesForUser

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

getJWTPayload

  • getJWTPayload(sessionHandle: string): Promise<any>

getSession

getSessionData

  • getSessionData(sessionHandle: string): Promise<any>

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>

updateJWTPayload

  • updateJWTPayload(sessionHandle: string, newJWTPayload: any): Promise<void>

updateSessionData

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

verifySession

Generated using TypeDoc