rxtATX / OffNOn

In this application, users will be able to submit tickets (requests for help) with their coding work, technical questions, etc. Tickets will be created to be addressed by technicians. This application models the AskBCS and JIRA ticket systems.
2 stars 2 forks source link

Add Security to User model #36

Closed Christoph551 closed 1 year ago

Christoph551 commented 1 year ago

The developer will modify the existing User model to allow for bcrypt hashing and decrypting.

It is done when the User model has a hooks object in the second object argument given to the init function. It is done when a beforeCreate and beforeUpdate both hash the raw string password of a user. It is done when an instance method is added to the User class allowing passwords to be compared. It is done when it is confirmed that the seed files run the { individualHooks: true } on the User bulkCreate.