CDLUC3 / dmsp_backend_prototype

The GraphQL (Apollo server) backend for the new DMSP system
0 stars 0 forks source link

Implemented a simple username, password authentication #32

Closed jupiter007 closed 1 month ago

jupiter007 commented 1 month ago

#31

Created a router.js file to handle the different routes, and added a User controller to handle the different auth endpoints, as well as a User model/class.

Used 'jsonwebtoken' to generate a token for the frontend and 'bcrypt' to encrypt the password for the database.

Also, added a couple of .sql files to the data-migration scripts to create a User table, and populate it with a test user.

jupiter007 commented 1 month ago

I went the changes with Brian, and we agreed to go ahead and merge the changes into the development branch.