-
-
Notifications
You must be signed in to change notification settings - Fork 644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with auth.attemp password Password does not match error #500
Comments
Hey @eriasu ! May you copy/paste some code where you're using |
@RomainLanz no problem * doRegister(request, response){
const user = new User()
user.username = request.input('name')
user.email = request.input('email')
user.password = yield Hash.make(request.input('password'))
yield user.save()
yield response.sendView('register')
}
* login(request, response) {
const email = request.input('email')
const password = request.input('password')
const login = yield request.auth.attempt(email,password)
if(login){
response.send('Logged In')
return
}
response.unauthorized('Invalid Credentails')
} |
Kind of weird. Mind creating a sample repo with the same code I can use to reproduce the issue? |
Sorry for the delay https://github.com/eriasu/AdonisTest |
You are hashing the password twice. Their is hook inside It needs to be
|
yeah it was that stupid me srry for the trouble thanks for the help! |
Closing the issue |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hi i have a problem when i want to verify the hash password the response is always false and i cant loging i send to the console the plaintext, the hash password and use the verify function in the Hash library when i create the user the verify send true when i want to login the verify send false

The text was updated successfully, but these errors were encountered: