Ocurred error: crypto/bccrypt, hashedpassword is not the hash of the given password when trying get acess token in end point token

#1

We are trying to use Hydra with authorization code flow and oidc, but we got a error:

{
“error”: “invalid_client”,
“error_description”: “Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method)”,
“status_code”: 401,
“error_debug”: “crypto/bcrypt: hashedPassword is not the hash of the given password”
}

when we request to the “localhost:4444/oauth2/token” with params:

  • “grant_type”, “authorization_code”
  • “code”, (code)
  • “redirect_uri”, “http://localhost:3000/home
  • “client_id”, (cliente id)
  • “client_secret”, (secret)

Our client:

{
“client_id”: “t”,
“client_name”: “string”,
“redirect_uris”: [
http://localhost:8080/home
],
“grant_types”: [
“authorization_code”,
“implicit”,
“client_credentials”,
“refresh_token”
],
“response_types”: [
“code”,
“id_token”
],
“scope”: “offline_access offline openid”,
“audience”: null,
“owner”: “”,
“policy_uri”: “”,
“allowed_cors_origins”: null,
“tos_uri”: “”,
“client_uri”: “”,
“logo_uri”: “”,
“contacts”: null,
“client_secret_expires_at”: 0,
“subject_type”: “public”,
“token_endpoint_auth_method”: “client_secret_post”,
“userinfo_signed_response_alg”: “none”,
“created_at”: “0001-01-01T00:00:00Z”,
“updated_at”: “2019-06-13T15:12:36Z”
}

#2

Try setting this to “token_endpoint_auth_method”: “none”,.

1 Like
#3

Tkss, but we solved sending the correct secret :smile: