I have an application which is getting Auth from Keycloak.
My Access Type is public so I do not have any client secret.
I have given access to "Direct Access Grants Enabled" as ON
Refer below:
I am getting error from postman as below:
{
"error": "invalid_grant",
"error_description": "Invalid user credentials"
}
Note : My credentials is right as I am using same to login on keycloak
I have also check the key and they seems correct as per below reference:
https://gist.github.com/rac021/623e4f4c87069acd0c38d952568f8a3d
while I have setup as per my understanding.
References:
Please let me know if I missing anything or you need any more details.
Any workaround will be appreciated !!!!
The error message "Invalid user credentials"
is reliable. That is, you either specified a wrong username or password.
Check that the user really exists in the realm you are addressing with the URL. Particularly if it is not the master realm which usually will be used to login to keycloak admin console.
I had the same problem. Mine was due the the OTP (optional) in the direct grant Flow
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With