Email Confirmation

Let’s develop the email confirmation page so we can generate a nice confirmation message.

An important step for any new user creating a new account is to verify their email through the confirmation link that they get in their mailbox.

Modify the backend

Initially, we redirect the user to the /verify/${confirmationToken} route to verify their account. Then, we modify the route to redirect the user to a front-end route so that we can display a nice message to indicate the status of confirmation. We change href=${process.env.API_URL}/verify/${confirmationToken} to href=http://localhost:4000/verify/${confirmationToken}.

Note: The application’s frontend is running on the 4000 port.

Get hands-on with 1200+ tech skills courses.