15

I am using Keycloak authentication to authenticate an angular app and so far I have managed to redirect my login to Keycloak server. But when redirected instead of the login page I am getting a 500 error page with the message Invalid parameter: redirect_uri

THelper
  • 15,333
  • 6
  • 64
  • 104
VIJAY THAKUR
  • 2,205
  • 3
  • 11
  • 7
  • 1
    So what have you put as redirect url in the client configuration screen of the keycloak console ? – Sébastien Blanc Jul 28 '17 at 06:07
  • 1
    Please have a look at my answer here: https://stackoverflow.com/questions/37115626/getting-invalid-parameter-redirect-uri-trying-node-js-authentication-with-key/37117339#37117339 – Christian Jul 31 '17 at 07:48
  • 2
    Does this answer your question? [keycloak Invalid parameter: redirect\_uri](https://stackoverflow.com/questions/45352880/keycloak-invalid-parameter-redirect-uri) – mithril_knight Jun 10 '21 at 23:08

2 Answers2

10

When you created the client in Keycloak you set the required 'Valid Redirect URIs' field. Most likely the pattern you entered there doesn't match the redirect uri you are sending from your client. If you use ports numbers, they have to match too!. If this is not the problem, check what your Keycloak server is logging and add those details here to your question.

Jibi Makkar
  • 63
  • 1
  • 8
THelper
  • 15,333
  • 6
  • 64
  • 104
3

this is occurred due to base url and valid redirect url are different. So I have added same URL on both the text box.Now its working fine.

VIJAY THAKUR
  • 2,205
  • 3
  • 11
  • 7