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

[FEATURE_REQUEST] change keycloak auth to be custom url instead of automatically appending /auth #564

Closed
lgwapnitsky opened this issue Mar 16, 2022 · 7 comments
Labels
🦄 Feature Request [ISSUE] Suggestion for new feature, update or change 📌 Keep Open [ISSUE][PR] Prevent auto-closing

Comments

@lgwapnitsky
Copy link

Is your feature request related to a problem? If so, please describe.

The new version of keycloak does not expose the /auth path by default. When pulling down the newest code, I have to go in and manually edit the file at src/utils/KeycloakAuth.js to remove the path. By default, it reads like this:

class KeycloakAuth {
  constructor() {
    const { auth } = getAppConfig();
    const { serverUrl, realm, clientId } = auth.keycloak;
    const initOptions = {
      url: `${serverUrl}/auth`, realm, clientId, onLoad: 'login-required',
    };

    this.keycloakClient = Keycloak(initOptions);
  }

but I remove the path in the url variable to read as such:

  constructor() {
    const { auth } = getAppConfig();
    const { serverUrl, realm, clientId } = auth.keycloak;
    const initOptions = {
      url: `${serverUrl}`, realm, clientId, onLoad: 'login-required',
    };

    this.keycloakClient = Keycloak(initOptions);
  }

I originally discovered this issue after filing ticket #520 and working through diagnostics

Describe the solution you'd like

remove the /auth path from KeycloakAuth.js, and change the instructions to have the user/administrator put in the full path, depending on the version of KC

Priority

Medium (Would be very useful)

Is this something you would be keen to implement

Maybe

@lgwapnitsky lgwapnitsky added the 🦄 Feature Request [ISSUE] Suggestion for new feature, update or change label Mar 16, 2022
@liss-bot

This comment was marked as outdated.

@Lissy93 Lissy93 reopened this Mar 16, 2022
@Lissy93
Copy link
Owner

Lissy93 commented Mar 16, 2022

Thanks for the detailed outline, reopened and I will get this fixed :)

@Lissy93
Copy link
Owner

Lissy93 commented Mar 28, 2022

Merged in #557 :)

@TheUdK
Copy link

TheUdK commented Mar 29, 2022

This change broke existing setups running earlier versions of KC. Maybe you would want to add add a note to the release as well also documentation for the configuration.

If running dashy 2.0.6 and KC version before 17? you need to change appConfig.auth.keycloak.serverUrl from xx.xx.xx to xx.xx.xx/auth

@liss-bot
Copy link
Collaborator

This issue has gone 6 weeks without an update. To keep the ticket open, please indicate that it is still relevant in a comment below. Otherwise it will be closed in 5 working days.

@liss-bot liss-bot added the ⚰️ Stale [ISSUE] [PR] No activity for over 1 month label Apr 29, 2022
@Lissy93
Copy link
Owner

Lissy93 commented May 2, 2022

/keep-open

@Lissy93 Lissy93 added 📌 Keep Open [ISSUE][PR] Prevent auto-closing and removed ⚰️ Stale [ISSUE] [PR] No activity for over 1 month labels May 2, 2022
@liss-bot
Copy link
Collaborator

The fix for this issue has now been released in 2.0.9 ✨

If you haven't done so already, please update your instance to 2.0.9 or later. See 2.0.9 for full info.

Feel free to reach out if you need any more support. If you are enjoying Dashy, consider supporting the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🦄 Feature Request [ISSUE] Suggestion for new feature, update or change 📌 Keep Open [ISSUE][PR] Prevent auto-closing
Projects
None yet
Development

No branches or pull requests

4 participants