Bootcamp Project: To another student’s MVP, added a full authentication capability to the instructors’ users group: a login component, a tested encrypted password, tested authentication and authorisation process via a guard as well as a registration component.
Draw on the whiteboard the basic schema of communication between client and server. Explain that some routes will be protected.
The login API route, when successful, will return a token
The client will store this token in localStorage
The client will pass this token along with every request to a protected API endpoint, through the x-access-token header
The server will verify the token and will respond with the appropriate data, or an error if authentication failed.