Repository navigation
Issue with Identity Provider Token Exchange: "Client not allowed to exchange" #23993
Unanswered
BaselSalman
asked this question in
Q&A
Replies: 3 comments 4 replies
|
Hello there. |
2 replies
|
Anyone here solved? |
0 replies
I successfully enabled the token exchange feature and made it work in my case. I'd like to share the information below, hoping it can help resolve your problem as well. 1. First, make sure you have enabled the feature as pointed out here: #23993 (reply in thread)2. Second, make sure you have enabled "Fine-grained permissions" for the client that'll initiate the token exchange flow. If not enabled, it looks like:3. Then, add a policy to allow the token exchange flow. You need to go to the "realm-management" client to do that, not the client that'll initiate the flow.4. Back to the previous "permission details" tab and apply the policy to the permission:5. Now you are good to test the token exchange flow: |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
- 8F6A
Uh oh!
There was an error while loading. Please reload this page.
I'm working on a feature where I need to exchange social tokens (e.g., from Facebook or Google) for Keycloak access tokens. I've configured the external social providers in Keycloak, and the process generally works as expected. However, when attempting to exchange a token from a user that's already linked with the respective identity provider, I encounter a 403 status code with the error message "Client not allowed to exchange".
Here's the relevant request body (as per the provided screenshot):
I've ensured that my configuration aligns with Keycloak's documentation, and I'm at a bit of a loss regarding this error.
Has anyone faced a similar issue? Any insights or solutions would be greatly appreciated.
All reactions