funk101
response.session.mergeIntoAccessTokenPayload()
signInPOST
response
console.log()
rp_st
signInPOST: async function (input) { if (originalImplementation.signInPOST === undefined) { throw Error("Shouldn't come here"); } try { const response = await originalImplementation.signInPOST( input ); if (response.status === "OK") { const currentAccessTokenPayload = response.session.getAccessTokenPayload(); await response.session.mergeIntoAccessTokenPayload({ ...currentAccessTokenPayload, message: "Hello World", }); console.log("Payload: ", currentAccessTokenPayload); } return response; } catch (err) { console.log("signInPOST: ", err); } },
Payload: {}
currentAccessTokenPayload
mergeIntoAccessTokenPayload
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).