Repository navigation
Redirect URI set correctly but getting "Incorrect redirect_uri" error from token endpoint #13661
Answered
by
dheeraj-326
dheeraj-326
asked this question in
Q&A
|
Redirect URIs are set correctly Please HELP! :( |
Answered by
dheeraj-326
Aug 9, 2022
Replies: 3 comments 3 replies
|
@dheeraj-326 Where and when did you obtain the It seems you are using Authorization code flow. The request you added shows step 6. Is it possible that step 2 was done with a different redirect_uri than step 6? |
2 replies
|
Thanks for that. Locally debugging Keycloak might indeed be my only option
here.
…On Tue, Aug 9, 2022, 2:28 PM Michal Hajas ***@***.***> wrote:
The error is thrown here:
https://github.com/keycloak/keycloak/blob/e44cea587fe97d73b83de2ea8e943cf079ce95ee/services/src/main/java/org/keycloak/protocol/oidc/endpoints/TokenEndpoint.java#L370-L373
You can try to put a breakpoint there and see what is the difference
between redirectUriParam (the one from your request) and redirectUri (the
one stored in step 2).
—
Reply to this email directly, view it on GitHub
<#13661 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AF6XFNOH7BGRX6I4IONEM6DVYIMUHANCNFSM557T6IXQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
0 replies
|
I found the solution. The configuration I have set in Keycloak configuration is "http://locahost:8000/*". But my "redirect_uri" was "http://locahost:8000". The issue was resolved when I added "http://localhost:8000" to "Valid redirect URIs" in client config. So it seems that adding an asterisk at the end is equivalent to a '+' in regex where it expects one or more items. |
1 reply
Answer selected by
dheeraj-326
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I found the solution. The configuration I have set in Keycloak configuration is "http://locahost:8000/*". But my "redirect_uri" was "http://locahost:8000". The issue was resolved when I added "http://localhost:8000" to "Valid redirect URIs" in client config.
So it seems that adding an asterisk at the end is equivalent to a '+' in regex where it expects one or more items.