Secure Email Transfer and Storage with Cookies for Onboarding
00:00 So we've got a little bit of a challenge here when I say Bobby at example.com right now we're just sending people over to the onboarding, but we need to have some mechanism to send the email address that they entered over to onboarding, but there are two problems with this problem.
00:14 Number one is we want to be able to verify the user's email address and like anybody could just say, oh, I'm just going to set it to any email address and then fill out the onboarding form.
00:25 And now I'm good. So we have to have like some sort of process here to say, hey, before you can actually go to the onboarding, you need to verify your email address. And so what we're going to do is we can set the email address in some sort of cookie, and then we pass that email address over to the onboarding.
00:45 That way, there's no way for somebody to just show up on onboarding without having to gone having gone through the signup process.
00:52 We'll take care of actually verifying the email later, but this exercise step is just about taking what they entered in the signup page and passing it over to onboarding without having to do some sort of context or like react state in here.
01:09 We can't use react state because the application is not even necessarily in the flow of things like we're on our app and then the user says, oh, OK, I'll go check my email. So they go off of our app into their email and then they come back later. And so we can't like use react state for that.
01:26 So we have to stick it in some sort of persistent storage, which is what cookies are for. So and on top of that, we need to sign the cookie so that people can't just make up their own and get into our onboarding flow as well.
01:39 So that is your task for this one is just to create a cookie, set the email in that cookie and then read the email from that cookie in the onboarding process. And we'll get to verification later.