issues
search
JohnTurkson
/
crypto-trading-platform
A simulated platform for trading and managing cryptocurrency portfolios. Built with React + Typescript, hosted and scaled on AWS (Lambda).
https://crypto.johnturkson.com
8
stars
3
forks
source link
Setup backend auth
#31
Closed
andykwan1124
closed
3 years ago
andykwan1124
commented
3 years ago
setup connection to mongoDB
setup User schema
setup route handler to automatically read each file in the
routes
folder and attach the routes to the initialized Express instance
setup
/signup
and
/login
endpoint
bcrypt is used to encrypt the password before saving user to database and sending data to frontend
a JWT is created on sign up or login, with the user id as the payload. This token along with the auth'ed user will be sent to frontend
routes
folder and attach the routes to the initialized Express instance/signup
and/login
endpoint