veet276
03/29/2022, 6:59 PMrp_st
03/29/2022, 7:02 PMrp_st
03/29/2022, 7:02 PMveet276
03/29/2022, 7:02 PMveet276
03/29/2022, 7:03 PMrp_st
03/29/2022, 7:04 PMveet276
03/29/2022, 7:04 PMveet276
03/29/2022, 7:04 PMrp_st
03/29/2022, 7:08 PMimport { createJWT } from "supertokens-node/recipe/jwt";
createJWT(
{ someKey: "someValue" }, // JWT payload
).then(result => {
if (result.status === "OK") {
let jwt = result.jwt;
// your logic with the JWT
} else {
throw Error("Should never come here");
}
})
rp_st
03/29/2022, 7:09 PMrp_st
03/29/2022, 7:09 PMveet276
03/29/2022, 7:10 PMrp_st
03/29/2022, 7:10 PMveet276
03/29/2022, 7:11 PMrp_st
03/29/2022, 7:12 PMveet276
03/30/2022, 2:12 AMUnhandledPromiseRejectionWarning: Error: SuperTokens core threw an error for a POST request to path: '/recipe/jwt' with status code: 400 and message: Field name 'validity' is invalid in JSON input
rp_st
03/30/2022, 4:16 AMnkshah2
03/30/2022, 4:19 AM