Skip to content

feat(auth): support standard OIDC providers (Keycloak, Dex, etc.)#9622

Open
dfliess wants to merge 1 commit into
rilldata:mainfrom
dfliess:feature/oidc-standard-auth-flows
Open

feat(auth): support standard OIDC providers (Keycloak, Dex, etc.)#9622
dfliess wants to merge 1 commit into
rilldata:mainfrom
dfliess:feature/oidc-standard-auth-flows

Conversation

@dfliess

@dfliess dfliess commented Jun 29, 2026

Copy link
Copy Markdown

Summary

This PR adds support for standard OIDC providers (Keycloak, Dex, Better Auth) alongside Auth0, making the auth module provider-agnostic. Three changes, all fully backward compatible:

  1. Issuer URLAUTH_DOMAIN containing :// is used verbatim as the issuer URL, enabling providers whose issuer has no trailing slash. Without ://, the existing Auth0 behavior is preserved ("https://"+domain+"/").

  2. Signup — Uses prompt=create (OIDC standard) instead of screen_hint=signup.

  3. Logout — Reads end_session_endpoint from the OIDC discovery document and uses post_logout_redirect_uri (RP-Initiated Logout). Falls back to Auth0's /v2/logout with returnTo when the endpoint is absent.

Test plan

  • End-to-end login/signup/logout with Keycloak 26 as OIDC provider
  • Verify Auth0 continues to work unchanged (no :// in AUTH_DOMAIN)
  • Verify Dex / Better Auth compatibility

Files changed

  • admin/server/auth/auth.go — issuer URL construction, discovery claims, struct field
  • admin/server/auth/handlers.go — signup param, logout endpoint

The auth module assumes Auth0 in three places: issuer URL construction
(trailing slash), signup parameter (screen_hint), and logout endpoint
(/v2/logout). This breaks any standard OIDC provider.

Fix all three, fully backward compatible:
- AUTH_DOMAIN with "://" is used verbatim as issuer; without it,
  the old "https://"+domain+"/" behavior is preserved.
- Signup uses prompt=create (OIDC standard) instead of screen_hint.
- Logout reads end_session_endpoint from discovery and falls back
  to Auth0's /v2/logout when absent.

Tested with Keycloak 26. Auth0 continues to work unchanged.
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

Successfully merging this pull request may close these issues.

1 participant