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.
:::