Alex
09/29/2022, 8:58 PMrp_st
09/29/2022, 8:59 PMrp_st
09/29/2022, 8:59 PMAlex
09/29/2022, 9:00 PMrp_st
09/29/2022, 9:00 PMAlex
09/29/2022, 9:00 PMrp_st
09/29/2022, 9:01 PMAlex
09/29/2022, 9:02 PMAlex
09/29/2022, 9:02 PMrp_st
09/29/2022, 9:06 PMAlex
09/29/2022, 9:07 PMrp_st
09/29/2022, 9:08 PMrp_st
09/29/2022, 9:08 PMAlex
09/29/2022, 9:09 PMrp_st
09/29/2022, 9:09 PMAlex
09/29/2022, 9:09 PMAlex
09/29/2022, 9:10 PMAlex
09/29/2022, 9:10 PMrp_st
09/29/2022, 9:10 PMrp_st
09/29/2022, 9:10 PMAlex
09/29/2022, 9:10 PMrp_st
09/29/2022, 9:10 PMAlex
09/29/2022, 9:10 PMrp_st
09/29/2022, 9:11 PMAlex
09/29/2022, 9:11 PMrp_st
09/29/2022, 9:11 PMAlex
09/29/2022, 9:11 PMrp_st
09/29/2022, 9:14 PMrp_st
09/29/2022, 9:18 PMAlex
09/29/2022, 9:19 PMrp_st
09/29/2022, 9:19 PMrp_st
09/29/2022, 9:20 PMrp_st
09/29/2022, 9:20 PMrp_st
09/29/2022, 9:26 PMget_email_for_user_id
. This function takes the user_id as input and is called during the email verification APIs. In our case, since we have created a session such that the email = to the session's user ID, you can simply return the user_id from this function.
- Post email verification, the session claim will be updated to signify that the email is verified, and then you can start the sign up flow in which you can generate a username and ask the user for their optional password and then call the sign up API with that. You also want to override that API to mark the username as verified in the email verification recipe.
----------
The advantage of this flow is that you don't actually create a user in supertokens until after email verification - so you don't need to make any cronjob to delete user or anything. If a user starts the flow and abandons it, the email verification token + session will eventually get removed anyway.rp_st
09/29/2022, 9:28 PMAlex
09/29/2022, 9:29 PMrp_st
09/29/2022, 9:30 PMrp_st
09/29/2022, 9:30 PMrp_st
09/29/2022, 9:30 PMAlex
09/29/2022, 9:31 PMrp_st
09/29/2022, 9:31 PMAlex
09/29/2022, 9:31 PMrp_st
09/29/2022, 9:32 PMAlex
09/29/2022, 10:30 PM/{apiBasePath}/user/email/verify/token
to send a verification email? Or is there a way for this to be sent when /{apiBasePath}/signup
is called?Alex
09/29/2022, 10:45 PMAlex
09/30/2022, 1:55 AMrp_st
09/30/2022, 4:23 AMrp_st
09/30/2022, 4:25 AM