Create a Signup Page
The signup page is quite similar to the login page that we just created. But it has a couple of key differences. When we sign the user up, AWS Cognito sends them a confirmation code via email. We also need to authenticate the new user once they’ve confirmed their account.
So the signup flow will look something like this:
-
The user types in their email, password, and confirms their password.
-
We sign them up with Amazon Cognito using the AWS Amplify library and get a user object in return.
-
We then render a form to accept the confirmation code that AWS Cognito has emailed to them.
-
We confirm the sign up by sending the confirmation code to AWS Cognito.
-
We authenticate the newly created user.
-
Finally, we update the app state with the session.
So let’s get started by creating the basic sign up form first.
If you liked this post, please subscribe to our newsletter, give us a star on GitHub, and chat to our Bot.
For help and discussion
Comments on this chapter