cognovi-ai / the-cdj

The Cognitive Distortion Journal (CDJ) is a smart journaling tool that helps remedy distorted thinking. It can feel impossible to follow the CBT technique of labeling and reframing distorted thinking when you've been thinking this way your whole life. The CDJ can help with that 🧠✨ -- v2 is in development!
https://thecdj.app
3 stars 0 forks source link

Encryption #11

Closed hiyaryan closed 11 months ago

hiyaryan commented 11 months ago

Add hashing to the users passwords.

  1. Basic bcrypt hashing is working.
  2. Working on replacing it with passport-local-mongoose
hiyaryan commented 11 months ago

Commit history includes two similar encryption techniques from two different node packages. One from the bcrypt package and one from the passport package (collection of passport packages). Passport is the choice of encryption as it will be convenient to extend it with other available login options such as using google or facebook and it uses bcrypt under the hood.

Since passport-local-mongoose adds a password and email (changed from default 'username') field automatically, the schema had to be updated to remove those fields and the seed data had to be updated as well to take that into consideration.