Making NodeJS backend to support authentication of users and edit product databse in MongoDB
Front End html pages are shit. Never mind.
This is me just writing REST API for a backend server
USES JWT token to authenticate user. JWT stored as cookie. Logout option not included in case of logging out got to erase the cookie with front end.
provided api(in case of postman usage)
/api/auth/register post : {name,phone,email,pwd}
/api/auth/verifiy get : {vsalt}
/api/auth/signin post : {email, pwd}
/api/auth/forgotpass post : {email, new pwd}
/api/auth/resetpass get : {vsalt, new pwd}
/api/util/add post : {name, quantity}
/api/util/update post : {uid, quantity}
/api/util/delete post : {uid}
/api/util/findrecord get : {uid}
/api/util/listall get