Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keycloak test app no longer work with Keycloak 18 #306

Closed
garronej opened this issue Apr 24, 2022 · 8 comments
Closed

Keycloak test app no longer work with Keycloak 18 #306

garronej opened this issue Apr 24, 2022 · 8 comments

Comments

@garronej
Copy link
Contributor

Describe the bug

Screen.Recording.2022-04-24.at.15.27.30.mov

Version

18.0.0

Expected behavior

To see the login page

Actual behavior

fallback to error.ftl with message Invalid parameter: redirect_uri

How to Reproduce?

https://www.keycloak.org/getting-started/getting-started-docker

The parts when creating a user can be skipped.

Anything else?

Best regards

@stianst
Copy link
Contributor

stianst commented Apr 25, 2022

I've just double checked the getting started guide and it's working just fine here.

This issue would be caused by the client not being configured correctly. Did you remember to add the Root URL for the myclient?

@garronej
Copy link
Contributor Author

Thank you for your reply,

https://filedn.com/lYPEPucNMheV19aDu23lK0Q/misc/Screen%20Recording%202022-04-25%20at%2009.32.04.mov

I can't see what I am missing

@stianst
Copy link
Contributor

stianst commented Apr 25, 2022

Could you send a screenshot instead of video please?

@garronej
Copy link
Contributor Author

image

image

image

@stianst
Copy link
Contributor

stianst commented Apr 25, 2022

I see it's missing the redirect uri, which is needed. When you create a new client and specify a root url during the first step it'll prefill some other urls. However, if you add the root url after the client is created it won't.

Simplest is probably just to create the client and create a new one. Alternatively you can add a redirect uri, should he https://www.keycloak.org/app/

@garronej
Copy link
Contributor Author

garronej commented Apr 25, 2022

Thank you for the support I got it working 😊

When you create a new client and specify a root url during the first step it'll prefill some other urls. However, if you add
the root url after the client is created it won't.

OK, I see.
In v18 there is no longer a field for specifying root_url.
image

Thus the "Valid redirect URIs" have to be manually specified which is not specified in the getting started guide.

redirect uri, should he https://www.keycloak.org/app/

It wont work without a wildchar: https://www.keycloak.org/app/*

Thank for the support,
Best regards

garronej added a commit to keycloakify/keycloakify that referenced this issue Apr 25, 2022
garronej added a commit to keycloakify/keycloakify that referenced this issue Apr 25, 2022
@stianst
Copy link
Contributor

stianst commented Apr 25, 2022

There's no Root URL in the preview new admin console, but there is in the default admin console for KC 18. It should work without the '*', but just tried that and it doesn't. So, looks like there might be an issue, probably in keycloak.js as I'm seeing a pretty weird URL in the error message

type=LOGIN_ERROR, realmId=myrealm, clientId=myclient, userId=null, ipAddress=127.0.0.1, error=invalid_redirect_uri, redirect_uri=https://www.keycloak.org/app/#url=http://localhost:8080&realm=myrealm&client=myclient

Got no clue why #url=http://localhost:8080 is appended to the redirect-uri.

@garronej
Copy link
Contributor Author

garronej commented Apr 25, 2022

There's no Root URL in the preview new admin console

Ah, yes. That makes sense.

Thanks for sorting this out for me.

@stianst stianst closed this as completed Apr 27, 2022
dragonworr added a commit to dragonworr/keycloakify that referenced this issue Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants