Closed ytimocin closed 3 years ago
Hey @ytimocin, glad this boilerplate helped you. 🎉
To answer your question I tried changing the migration
and model
file of User password
property from STRING
to TEXT
and the test still passing. On your env
file have you set the SECRET
value?
First of all, thank you very much for this boilerplate. Helped me a lot.
My problem is that after registering a user, when trying to get a token with the credentials
bcrypt.compareSync(password, encodedPassword)
always returns false.Am I missing something? I have tried it with a lot of different users but nothing works for now.
All I can think of is that user.password in postgres might be text and somehow text and string comparison doesn't work as expected?