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

Index

Type aliases

APIOptions

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

Type declaration

JsonWebKey

JsonWebKey: { alg: string; e: string; kid: string; kty: string; n: string; use: string }

Type declaration

  • alg: string
  • e: string
  • kid: string
  • kty: string
  • n: string
  • use: string

Functions

createJWT

  • createJWT(payload: any, validitySeconds?: number): Promise<{ jwt: string; status: "OK" } | { status: "UNSUPPORTED_ALGORITHM_ERROR" }>
  • Parameters

    • payload: any
    • Optional validitySeconds: number

    Returns Promise<{ jwt: string; status: "OK" } | { status: "UNSUPPORTED_ALGORITHM_ERROR" }>

getJWKS

  • getJWKS(): Promise<{ keys: JsonWebKey[]; status: "OK" }>

init

  • init(config?: TypeInput): RecipeListFunction

Generated using TypeDoc