Skip to main content
Version: 7.2.X

createJWT(payload, validitySeconds)

Parameters#

  • payload (Optional)

    • type: any
    • Must be a valid JSON
  • validitySeconds (Optional)

    • type: number
    • Must be greater than 0

Returns#

Promise<{    status: "OK",    jwt: string,} | {    status: "UNSUPPORTED_ALGORITHM_ERROR",}>
Which frontend SDK do you use?
supertokens-web-js / mobile
supertokens-auth-react