Signup and get access to similar projects
Every week, we pick a real-life project to build your portfolio and get ready for a job. All projects are built with ChatGPT as co-pilot!
Start the ChallengeA tech-culture podcast where you learn to fight the enemies that blocks your way to become a successful professional in tech.
Listen the podcastAlmost every website in the world has user authentication. In this project you have to implement user authentication using Node for building a backend REST API and React.js and sessionStorage API for the frontend web application.
Implement an authentication system with the following parts:
At least the following pages and react components must be implemented into the project:
| Path | Component | Functionality |
|---|---|---|
/signup | <Signup> | Renders the signup form |
/login | <Login> | Renders the login form |
/private | <Private> | Validates that only authenticated users and render this component |
Do not clone this repository.
a) If using Gitpod (recommended) you can clone the boilerplate by clicking here.
b) If working locally type the following command from your command line: git clone https://github.com/4GeeksAcademy/expressjs-rest-hello.
π‘ Remember to create a new repository, update the remote (git remote set-url origin <your new url>), and upload the code to your new repository using add, commit and push.
Usually an authentication system is implemented in 4 parts:

At the beginning of every application that are not users or tokens, so the first step that makes sense to build is user signup.
/signup path at frontend./signup and match with its corresponding React.js page component that will take care of rendering the signup HTML.handleSubmit function fetches the email and password to the backend Node API, probably doing a POST /token request with the email and password on the body payload.This part of the process occurs only when new tokens have to be generated.
/login path, in the frontend./login path and match it with its corresponding React.js page component, this page will take care of rendering the login form.token object.sessionStorage./private.This process occurs when the user desires to logout.
onClick event handler is called.token from the sessionStorage.Any user can just type /private to attempt visiting a private page, that is why we need to implement a validation that prevents the anonymous users to see the content of this page, and we must redirect the user to /login or any other public page. This is usually how the process goes:
/private/private and match with its corresponding React.js page component that will take care of rendering the HTML.sessionStorage π does not have the token, the current user is not considered to be logged in and the component must redirect to the login view./private view component is loaded.Signup and get access to similar projects
Every week, we pick a real-life project to build your portfolio and get ready for a job. All projects are built with ChatGPT as co-pilot!
Start the ChallengeA tech-culture podcast where you learn to fight the enemies that blocks your way to become a successful professional in tech.
Listen the podcast