hiyaryan / 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 distorted thinking and finding alternative modes of thought (i.e. reframing) while cognitive distortions are occurring. The CDJ does that work for you. -- The CDJ is in beta testing!!
https://thecdj.app
3 stars 0 forks source link

Encryption #11

Closed hiyaryan closed 9 months ago

hiyaryan commented 9 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 9 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.