π¦ Authentication in a React App π¦
Posted on Dec 14th, 2021
ποΈ Todayβs topics
- Revisit βWhat is logged in?β in code
- Requesting and auth token for login
π― Project
Work with your team to get the initial code in place for Questionbox or Social E-cards projects.
By Friday
- be able to make GET requests for questions and answers / cards and friends
- show them on the page
- have a solid start on POST requests
- deploy to Netlify as soon as possible (TIP β Your code needs to run locally with no errors before you can deploy it!)
π Resources
- Token Authentication Endpoint guide for djoser library -> This is the library being used by the backend
- use-local-storage-state -> You would
npm install use-local-storage-state
to use it in your code- Check out this custom hook code example, which shows how you could implement this yourself (you could even borrow this code and use it in your project instead of the above library if you wanted to!).
- Using the Web Storage API
- How to Build a Front-End App Before you Have an API