[URGENT] : Client secret not provided in request

5,174 views
Skip to first unread message

avantika karwasara

unread,
Jun 10, 2020, 3:42:17 AM6/10/20
to Keycloak User
keycloak js version -> ^10.0.2
angular -> ^7.2.16

keycloak.json 

{
 "realm": "REALM",
 "auth-server-url": "https://xxxx.com/auth/",
 "ssl-required": "external",
 "resource": "CLIENT_ID",
 "verify-token-audience": true,
 "credentials": {
   "secret": "CLIENT_SECRET_KEY"
 },
 "use-resource-role-mappings": true,
 "confidential-port": 0,
 "policy-enforcer": {}
}



when keycloak made this call `https://xxx.com/auth/realms/guavus/protocol/openid-connect/token` than giving this error.

{"error":"unauthorized_client","error_description":"Client secret not provided in request"}

as per documentation removed credential support from javascript adapter -> https://www.keycloak.org/docs/latest/release_notes/#credentials-support-removed-from-the-javascript-adapter
than what is the alternative of this and how to fix this error

need urgent help I am stuck last 3 days 

JINU JOHN

unread,
Jun 10, 2020, 3:51:43 AM6/10/20
to avantika karwasara, Keycloak User
In the Keycloak's Client configuration page use  Access Type as confidential. This will enable the Credentials and Authentication tabs

You will find your Secret Key inside the Credentials tab

Hope this helps.

--
You received this message because you are subscribed to the Google Groups "Keycloak User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-user/bd2bdffd-fd78-4f5f-8d23-7ebce70bcf89o%40googlegroups.com.


--
Jinu John

Björn Sonntag

unread,
Jun 10, 2020, 3:51:57 AM6/10/20
to avantika karwasara, Keycloak User
Hello Avantika,

You can try to pass the clientid + secret in the http header of the token request like 

'Basic '+Base64.encode(<clientid>+‘:‘+<secret>)  (I am not fit in JS) 

Be aware that the string which shall be encoded is utf-8. 

Hope it helps.

Kind regards

Bjoern




avantika karwasara

unread,
Jun 10, 2020, 4:02:47 AM6/10/20
to Keycloak User
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
Access type is confidential.
To unsubscribe from this group and stop receiving emails from it, send an email to keyclo...@googlegroups.com.


--
Jinu John

avantika karwasara

unread,
Jun 10, 2020, 4:03:48 AM6/10/20
to Keycloak User
Question is how can I modify `token` request by itself in my application

JINU JOHN

unread,
Jun 10, 2020, 4:12:07 AM6/10/20
to avantika karwasara, Keycloak User
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
Yes, you are right for keycloakjs the confidential/secret id mechanism is deprecated



To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-user/fbe4f776-4503-4d7f-aa3f-614c21129298o%40googlegroups.com.


--
Jinu John

avantika karwasara

unread,
Jun 10, 2020, 5:18:47 AM6/10/20
to Keycloak User
Than how to authenticate confidential client in keycloak?

arvind....@gmail.com

unread,
Feb 19, 2021, 1:33:33 AM2/19/21
to Keycloak User

Hi . 
      I am facing similar issue in GUI where i am using Keycloak JS adapter. I am using a keycloak confidential client for authentication. Is there any to go forward other than using a public client. 
Reply all
Reply to author
Forward
0 new messages