-
Notifications
You must be signed in to change notification settings - Fork 57
Add Keycloak as an SSO Provider #822
Copy link
Copy link
Open
Labels
backendenhancementNew feature or requestNew feature or requestfrontendChange in frontend codeChange in frontend codepythonPull requests that update Python codePull requests that update Python codetypescriptPull requests that update Typescript codePull requests that update Typescript code
Metadata
Metadata
Assignees
Labels
backendenhancementNew feature or requestNew feature or requestfrontendChange in frontend codeChange in frontend codepythonPull requests that update Python codePull requests that update Python codetypescriptPull requests that update Typescript codePull requests that update Typescript code
Is your feature request related to a problem?
Users self-hosting Phase who use Keycloak as their identity provider (IdP) cannot currently use it for single sign-on. Keycloak is one of the most widely adopted open-source identity and access management solutions, especially popular among teams self-hosting their infrastructure — the exact audience Phase's self-hosted offering targets.
Describe the solution you'd like
Add Keycloak as a first-class SSO provider, following the same OIDC integration pattern used by existing providers (Authentik, Okta, JumpCloud, Entra ID).
Configuration
Three environment variables:
KEYCLOAK_CLIENT_IDphase-consoleKEYCLOAK_CLIENT_SECRETsecretKEYCLOAK_ISSUER_URLhttps://keycloak.example.com/realms/myrealmEnable via
SSO_PROVIDERS=keycloak(comma-separated with other providers).Implementation scope
Backend:
GenericOpenIDConnectAdapterwith Keycloak-specific discovery URL ({KEYCLOAK_ISSUER_URL}/.well-known/openid-configuration)KeycloakLoginViewinapi/views/auth.py/social/login/keycloak/SOCIALACCOUNT_PROVIDERSinsettings.pyFrontend:
genericOIDCProviderfactory (frontend/ee/authentication/sso/oidc/util/)SignInButtons.tsxfrontend/components/common/logos/)[...nextauth].ts