Account creation
Setting up a user account is a common task for web applications. In this guide, youโll learn how to set up a user account in Epic News.
The signup screen
Section titled โThe signup screenโIn the address bar of your browser, navigate to the /signup
route:
http://localhost:3000/signup
As you can see, there are two ways to sign up for an account: with an email address and password, or with GitHub as single-sign-on (SSO) provider.
In this guide, we will cover the simple email/password method, and configure SSO in the next step.
Email and password method
Section titled โEmail and password methodโBy far the most common way to sign up for an account is with an email address and password.
Enter a dummy email address
Section titled โEnter a dummy email addressโTo get started, fill out an easy-to-remember dummy email address. Something like example@email.com
will do.
Click โSubmitโ.
Check the confirmation email
Section titled โCheck the confirmation emailโAfter you submit the form, youโll see a message that says โCheck your emailโ, and an input box to enter the confirmation code.
If this were a production website, we would have configured the email service to send a confirmation email to the address you entered. However, on localhost, this isnโt possible.
Instead, a dummy email is generated and displayed in the terminal. Head back to the VS Code terminal and you will see a message printed in green text.
This is the plain text version of the email that would have been sent to the user in a production environment. Hover over the link and CTRL + click
(or CMD + click
on Mac) to confirm your email address.
The same form as the one earlier will appear, but this time with the confirmation code input pre-filled. Click โSubmitโ to confirm your email address.
User details
Section titled โUser detailsโFill in your dummy user details in the next screen, accept the Terms of Service, and click โCreate an accountโ:
Account created
Section titled โAccount createdโYou will be redirected to the home page, and you will see your first โtoastโ confirmation page appear briefly at the top of the page. We will learn how to create custom toast messages later.
Summary
Section titled โSummaryโIn this guide, you learned how to create a user account in Epic News using a simple email and password. You also learned how to confirm your email address and fill in your user details.
In the next guide, youโll learn how to set up Single Sign On (SSO) using Github as the provider.
:::