Hi, im trying to register a user, however i got error phc argon #1468
-
See error Register Method public async register ({ request, auth, response }: HttpContextContract) {
const validationSchema = schema.create({
name: schema.string({trim: true }),
email: schema.string({ trim: true }, [
rules.email(),
rules.maxLength(255),
rules.unique({ table: 'users', column: 'email' }),
]),
password: schema.string({ trim: true }, [
rules.confirmed(),
]),
})
const userDetails = await request.validate({
schema: validationSchema,
})
/**
* Create a new user
*/
const user = new User()
user.name = userDetails.name
user.email = userDetails.email
user.password = userDetails.password
await user.save()
return response.redirect('/')
} |
Beta Was this translation helpful? Give feedback.
Answered by
mayureshnw
Aug 16, 2020
Replies: 1 comment
-
This should fix your issue. list: {
/*
|--------------------------------------------------------------------------
| Argon
|--------------------------------------------------------------------------
|
| Argon mapping uses the `argon2` driver to hash values.
|
| Make sure you install the underlying dependency for this driver to work.
| https://www.npmjs.com/package/phc-argon2.
|
| npm install phc-argon2
|
*/ |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
thetutlage
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
npm install phc-argon2
This should fix your issue.
Refer
hash.ts