feat: add OpenID Connect authentication support #532
Closed
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.
Description
This PR adds OpenID Connect (OIDC) authentication support to Kaneo, enabling enterprise Single Sign-On (SSO) integration with identity providers like Keycloak, Auth0, Okta, Google Workspace, Azure AD, and any
OIDC-compliant provider.
Related Issue(s)
N/A - New feature implementation
Type of Change
Changes Made
Backend (API)
genericOAuthplugin to better-auth configuration inapps/api/src/auth.ts.env.samplewith OIDC environment variables/configinstead of/mecompose.local.ymlwith OIDC configuration exampleFrontend (Web)
genericOAuthClientplugin to auth client inapps/web/src/lib/auth-client.tsapps/web/src/routes/auth/sign-in.tsxKANEO_ENABLED_AUTHenvironment variable to control visible authentication methodsvite.config.tsto supportKANEO_environment variable prefixDocumentation
apps/docs/content/docs/integrations/oidc.mdx- Main integrationapps/docs/content/docs/integrations/oidc/setup.mdx- Detailed setup guideapps/docs/content/docs/integrations/oidc/configuration.mdx- Advanced configurationREADME.mdwith OIDC authentication sectionmeta.jsonOther
.gitignorefor JetBrains IDEsHow Has This Been Tested?
Manual Testing:
Screenshots (if applicable)
N/A - Authentication flow follows existing UI patterns with new OIDC button
Checklist
Additional Notes
Environment Variables
API:
OIDC_CLIENT_ID- OAuth2 client ID from identity providerOIDC_CLIENT_SECRET- OAuth2 client secret (keep secure!)OIDC_DISCOVERY_URL- OIDC well-known discovery endpointOIDC_SCOPES- OAuth scopes (default:openid profile email)Web:
KANEO_ENABLED_AUTH- Comma-separated authentication methods (e.g.,oidc,standalone,guest)Security Considerations
Provider Support
Documented setup for:
Breaking Changes
None - This is a purely additive feature. Existing authentication methods (email/password, GitHub, guest) continue to work unchanged.