Closed yann-yinn closed 2 years ago
This should go to the discussion forum and not the issues board. We keep issues only for confirmed bugs
For now, the error is in your controller. You are assigning the email to the password during signup https://github.com/yann-yinn/adonis-starter/blob/e870c764dfe24858cf0b4c683c80d40bb4456f6d/app/Controllers/Http/SignupController.ts#L37
Oh my god 😅 That's is obviously the issue, god bless you xD
I asked on discord before coming here but I had no awnser. I guess i made a mistake but i can't find which one and i'm stuck for hours with this one.
On login, when using
await auth.attempt(request.input('email'), request.input('password'))
, i'm always having the same error in the following controller : https://github.com/yann-yinn/adonis-starter/blob/e870c764dfe24858cf0b4c683c80d40bb4456f6d/app/Controllers/Http/LoginController.ts#L21But I checked multiple times the email and the password are the ones I entered when creating my account, and I see my password is hashed with argon inside my users table.
Calling directly
auth.login
method, I got a "invalid credentials error" Any idea what's wrong with my code ?Strangely, login work just after my account is created (using auth.login(user) inside my signup controller). But after logout, no way to log in again
Package version
Node.js and npm version
node: v14.17.5 npm: 7.21.0
Sample Code (to reproduce the issue)
BONUS (a sample repo to reproduce the issue)