aschepis
01/21/2022, 8:23 PMporcellus
01/21/2022, 8:37 PMporcellus
01/21/2022, 8:41 PMporcellus
01/21/2022, 8:43 PMuseSessionContext
, but this will get transmitted with every request. (https://supertokens.io/docs/emailpassword/common-customizations/user-roles/assigning-session-roles)porcellus
01/21/2022, 8:45 PMporcellus
01/21/2022, 8:47 PMaschepis
01/21/2022, 8:52 PMporcellus
01/21/2022, 8:57 PMporcellus
01/21/2022, 9:01 PMupdateEmailOrPassword
), then revoking all their sessions (revokeAllSessionsForUser
)porcellus
01/21/2022, 9:15 PMsignUpPOST
. Something like this should work:
EmailPassword.init({
override: {
apis: (originalImplementation) => ({
...originalImplementation,
signUpPOST: async function (input) {
const email = input.formFields.find((f) => f.id === "email").value;
const password = input.formFields.find((f) => f.id === "password").value;
return EmailPassword.signUp(email, password);
},
}),
},
// ...
},
workoutintheabstract
01/21/2022, 9:16 PMworkoutintheabstract
01/21/2022, 9:16 PMworkoutintheabstract
01/21/2022, 9:17 PMworkoutintheabstract
01/21/2022, 9:17 PMporcellus
01/21/2022, 9:19 PM() => void
function, it needs to do the redirect itself (or do nothing, show a popup, whatever suits your needs)aschepis
01/22/2022, 1:50 AMrp
01/22/2022, 5:43 AMsam123
01/22/2022, 1:27 PMrp
01/22/2022, 1:32 PMrp
01/22/2022, 1:34 PMrp
01/22/2022, 1:35 PMsam123
01/22/2022, 1:40 PMrp
01/22/2022, 1:43 PMsam123
01/22/2022, 1:52 PMrp
01/22/2022, 2:01 PMsam123
01/22/2022, 2:03 PMsoham
01/22/2022, 2:28 PMsoham
01/22/2022, 2:30 PMsamurize
01/22/2022, 5:23 PMsamurize
01/22/2022, 5:24 PMsamurize
01/22/2022, 5:24 PM