We must start a local server where we keep track of the db.json file. For that we need to run this command on our IDE terminal. This will run the server in localhost:3000.
Now the register form won't allow to register unless the terms and conditions are accepted. Error also displays.
Register and Login modals return accessToken successfully. However the Login works with email and password instead of dni and password as it is intended. I'd need more time to research but in the meantime this achieves the goal.
👇 Click on the image for a new way to code review
####
[![Review these changes using an interactive CodeSee Map](https://s3.us-east-2.amazonaws.com/maps.codesee.io/images/github/IT-Academy-BCN/ita-profiles-frontend/20/71b097a1/8184f225cbe8a4c7406ba887341980dfc4ba0990.svg)](https://app.codesee.io/r/reviews?pr=20&src=https%3A%2F%2Fgithub.com%2FIT-Academy-BCN%2Fita-profiles-frontend)
#### Legend
Changes
This PR introduces json-server-auth as a temporal way of register and login users with json-server
We must start a local server where we keep track of the
db.json
file. For that we need to run this command on our IDE terminal. This will run the server in localhost:3000.npx json-server --watch db.json -m ./node_modules/json-server-auth
If we need to change the port of the server we add
-p xxxx
. This example will run the server on localhost:3001:npx json-server --watch -p 3001 db.json -m ./node_modules/json-server-auth
Axios has been added.
Cleaned up schema
Now the register form won't allow to register unless the terms and conditions are accepted. Error also displays.
accessToken
successfully. However the Login works with email and password instead of dni and password as it is intended. I'd need more time to research but in the meantime this achieves the goal.