vincent15000's avatar

Fortify - Unprocessable content 422 in production while loging in

Hello,

I have a Laravel / VueJS application with the authentication handled by Fortify.

Locally all works fine when I want to log in.

In production, I get this error : Unprocessable content 422.

What do you suggest me to check ?

Thanks for your help.

V

0 likes
4 replies
tykus's avatar
tykus
Best Answer
Level 104

The Response payload should have a JSON (assuming you are sending an XHR request) with the Validation errors.

1 like
vincent15000's avatar

@tykus Here is the response.

{"message":"auth.failed","errors":{"email":["auth.failed"]}}

That's strange because the email exists in the database.

vincent15000's avatar

@tykus Wow ... I just forgot that I had an observer initializing the password for each new use.

So when I seeded the database with initial users, the password wasn't this one from the seeder, but a random one.

Please or to participate in this conversation.