mezielabs / taskist

AdonisJS 5 from scratch
https://adonismastery.com/courses/adonisjs-5-from-scratch
12 stars 11 forks source link

error cant find argon2 module when registering #2

Closed derduskenga closed 4 years ago

derduskenga commented 4 years ago

error cant find argon2 module when registering.

It is caused by this line user.password = await Hash.make(user.password) in User.ts hook

derduskenga commented 4 years ago

I got a solution.

adonijs have the info here: https://preview.adonisjs.com/releases/core/preview-rc-1_7/#hash

However, these packages are not actively maintained and had some security vulnerabilities. We have forked and published them as phc-bcrypt and phc-argon2. So make sure to remove old dependencies from your application in favor of the new ones.

So you have to install phc-argon2. yourself from npm https://www.npmjs.com/package/phc-argon2