-
Notifications
You must be signed in to change notification settings - Fork 13
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
Failed to login by incorrect redirect url. #9
Comments
Hi: So I copy keycloak-session.js to my project and update the code, remove the argument 'url' from keycloak-session.login(url), it works for both locationType as 'hash' or 'auto'. It looks like keycloak.js can handle the redirect url. So we don't need to give it a redirect url. It is a good feature if we can control the logged-url when calling login(url) method. But when the caller did not passed into 'redirect url', instead to generate redirect url, I think it is better to leave it as empty and let the keycloak to handle it. |
any update for this problem? |
Hi team:
There is an issue on login redirect url.
Repro:
Create ember new project.
Add route: help.
In the routes/application.js, init keycloak, but set it as "session.set('onLoad', 'check-sso');", allow user not logged in at home page.
Update routes/help.js, add KeycloakAuthenticatedRouteMixin to require user login.
Note: At this point, it looks works. When open http://www.sample.com:4200/help, it redirect to keycloak login page and a user is able to log in.
Issue was start at:
when I update the environment.js, set as follows:
rootURL: '/test',
locationType: 'hash',
When open the site like www.sample.com:4200/test/#/help, it redirects to keycloak login page. But the keycloak login page return error: "Invalid parameter: redirect_uri".
The failure was caused by the redirect URL was set as: http://www.sample.com:4200#help.
It is wrong, the correct one should be http://www.sample.com:4200/test/#/help. The rootURL was missing.
Please help to take look and fix the issue. Thanks.
The text was updated successfully, but these errors were encountered: