fix: allow guest access when OIDC or Keycloak authentication is enabled#2054
Merged
Conversation
When enableGuestAccess: true is set alongside OIDC or Keycloak auth, unauthenticated visitors were immediately redirected to the identity provider with no way to view the dashboard as a guest. - Remove !isOidcEnabled() and !isKeycloakEnabled() guards from isGuestAccessEnabled() so the flag is respected for all auth providers - Skip signinRedirect() in OidcAuth when guest access is enabled - Skip keycloak.login() in KeycloakAuth when guest access is enabled - Fix getUserState() to return the guestAccess state when OIDC or Keycloak is active and guest access is on, so the login button appears - Fix goToLogin() in AuthButtons to trigger the correct provider flow (OIDC redirect or Keycloak login) instead of routing to /login
✅ Deploy Preview for dashy-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This was referenced Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Category
Bug Fix
Overview
When
enableGuestAccess: trueis set alongside OIDC or Keycloak authentication, unauthenticated visitors were immediately redirected to the identity provider with no way to view the dashboard as a guest. This fix ensures theenableGuestAccessflag is respected regardless of which auth provider is configured.Changes:
!isOidcEnabled()and!isKeycloakEnabled()guards fromisGuestAccessEnabled()inAuth.jsso the flag is honoured for all auth providerssigninRedirect()inOidcAuthwhen guest access is enabled, allowing unauthenticated users to reach the dashboardkeycloak.login()inKeycloakAuthwhen guest access is enabled, same rationalegetUserState()to return theguestAccessstate when OIDC or Keycloak is active and guest access is on — this makes the "Login" button appear for guests instead of being hiddengoToLogin()inAuthButtonsto trigger the correct provider flow (OIDC redirect or Keycloak login) instead of routing to/login, which has no effect when SSO is configuredIssue Number
Closes #2053 and #1755
Additional Info
auth.enableGuestAccessconfig flagenableGuestAccess: true