user
01/20/2022, 6:31 PMuser
01/20/2022, 6:31 PMuser
01/20/2022, 6:32 PMaschepis
01/20/2022, 9:44 PMaschepis
01/20/2022, 9:46 PMrp
01/21/2022, 3:29 AMuser
01/21/2022, 3:29 AMrp
01/21/2022, 3:30 AMcpalta
01/21/2022, 7:39 AMuser
01/21/2022, 4:22 PMworkoutintheabstract
01/21/2022, 4:25 PMworkoutintheabstract
01/21/2022, 4:27 PMaschepis
01/21/2022, 8:01 PMaschepis
01/21/2022, 8:19 PM<ThirdPartyAuth requireAuth={false}>
wrapping my component and using useSessionContext
in the component itself to see if there is a sessionaschepis
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: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 AM