Keycloak giving invalid redirect uri error

Pulkit Gupta picture Pulkit Gupta · Sep 22, 2016 · Viewed 10.4k times · Source

I am very new to keycloak so might be i am asking a very basic question.

Anyways the problem is as follows :

I have integrated my JBoss installation with keycloak saml adapter. It is installed correctly and Jboss is working perfectly fine. After this I have updated my application to include keycloak_saml.xml and updated the auth method in the web.xml to KEYCLOAK-SAML. This is all as per the keycloak official documentation. I am using a URI in entity id in my keycloak_saml.xml, for example : /wapps/myapp

The deployment and application startup was successful. However when I am testing I am getting 500 error and error message is invalid redirect URI.

I am able to see that the redirect URI is empty in the response headers. Has anyone seen this issue before. I do not have access to keycloak saml server so was not able to check what is set on the server side.

Please help.

Thanks!! Pulkit

Answer

Pulkit Gupta picture Pulkit Gupta · Oct 3, 2016

This was because of some configuration miss at the server side. Exact parameters which were missed are

  • Base URL
  • Master SAML Processing URL