keycloak Invalid parameter: redirect_uri

前端 未结 17 2152
旧时难觅i
旧时难觅i 2020-12-13 03:27

When I am trying to hit from my api to authenticate user from keycloak, but its giving me error Invalid parameter: redirect_uri on keycloak page. I have created my own realm

17条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-13 03:50

    If you're seeing this problem after you've made a modification to the Keycloak context path, you'll need to make an additional change to a redirect url setting:

    1. Change yourchange/auth back to auth in standalone.xml
    2. Restart Keycloak and navigate to the login page (/auth/admin)
    3. Log in and select the "Master" realm
    4. Select "Clients" from the side menu
    5. Select the "security-admin-console" client from the list that appears
    6. Change the "Valid Redirect URIs" from /auth/admin/master/console/* to /yourchange/auth/admin/master/console/*
    7. Save and sign out. You'll again see the "Invalid redirect url" message after signing out.
    8. Now, put in your original change yourchange/auth in standalone.xml Restart Keycloak and navigate to the login page (which is now /yourchange/auth/admin)
    9. Log in and enjoy

提交回复
热议问题