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 URLs should not be constructed with the auth-server-url but with the openid-configuration response #418

Open
rfx77 opened this issue Aug 26, 2022 · 0 comments

Comments

@rfx77
Copy link

rfx77 commented Aug 26, 2022

Describe the bug

Currently the realmUrl and other URLs are constructed by prefixing them with the auth-server-url from the config file. The auth-server-url should only be uses to get the openid-configuration:

/realms//.well-known/openid-configuration

In the response of this request you can get all necessary urls (eg logout, autohorization-endpoint,...)

Version

12

Expected behavior

Get all openid related endpoints from /realms//.well-known/openid-configuration

Actual behavior

this.authServerUrl = (resolveValue(config['auth-server-url'] || config['server-url'] || config.serverUrl || config.authServerUrl) || '').replace(/\/*$/gi, '')

this.realmUrl = this.authServerUrl + '/realms/' + this.realm

Keycloak.prototype.loginUrl = function (uuid, redirectUrl) {

Keycloak.prototype.logoutUrl = function (redirectUrl, idTokenHint) {

How to Reproduce?

No response

Anything else?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant