Greetings, I have been trying to configure Keycloak as a broker using Mercado Libre as Identity provider.
Problem is that even if I set the the endpoints suggested on their documentation (which is here)on the Keycloak admin console, for some reason I can’t get the token from the identity provider.
Keycloak seems to fail on doing a post to the token endpoint with the code returned by mercado libre (using the authorization code flow) returning a Bad gateway error (502) like shown here:
Now, when I use the code generated by mercado libre and obtained on keycloak, the token exchange works, so for some reason Keycloak fails to deliver the code to the token endpoint.
Also, the Keycloak logs show this:
05:08:35,141 WARN [org.keycloak.events] (default task-49) type=LOGIN_ERROR, realmId=anid_covid, clientId=null, userId=null, ipAddress=X.X.X.X, error=identity_provider_login_failure
05:15:10,913 ERROR [org.keycloak.broker.oidc.AbstractOAuth2IdentityProvider] (default task-49) Failed to make identity provider oauth callback: org.keycloak.broker.provider.IdentityBrokerException: No token from server.
Am I missing something? I am starting to think that since this API doesn’t use OIDC per se, then I’ll have to implement my own adapter but that is the worst case scenario for now.
(link to stackoverflow question here)