Week 20 pair-programming project for Technigo 24 week bootcamp.
This project ties together all the skills we learned so far to build an API with authentication to implement a registration flow, and a frontend with forms to register, sign in, and view some content once logged in.
Learning objectives:
- How to build a registration flow
- How to handle authentication, both in the frontend and in the backend
- How to build a frontend and backend at the same time
🔵 Blue Level
Backend:
- Registration endpoint, to create a new user.
- Passwords in the database should be encrypted with bcrypt
- Sign-in endpoint, to authenticate a returning user.
- An authenticated endpoint which only returns content if the
Authorization
header with the user's token was correct. - The authenticated endpoint should return a 401 or 403 (see 401 vs. 403 on SO) with an error message if you try to access it without an
Authentication
access token or with an invalid token. - The API should validate the user input when creating a new user, and return error messages which could be shown by the frontend (displaying the errors in a nice way in the frontend is a stretch goal - its fine to just show 'Something went wrong' on the frontend if you run out of time)
- The API should be deployed to Heroku or similar hosting service.
- The database should be deployed using mongo cloud or similar.
Frontend:
- A registration form which POSTs to the API to create a new user
- A sign-in form.
- A page to show the authenticated content from the API.
- A 'sign out' button that removes the saved access token and redirects the user to the login form.
- The frontend to should be deployed to Netlify or similar.
⚫ Black Level (Advanced Goals)
- Improve validations in the backend to ensure unique email addresses.
Backend: https://secrets-auth-app.herokuapp.com/
Frontend: https://secrets-auth-app.netlify.app/