feat: add generic OIDC provider for self-hosted identity providers

Adds support for any OpenID Connect compliant identity provider:
- Authentik
- Authelia
- Keycloak
- Okta
- Any other OIDC provider

Configuration via environment variables:
- SOCIAL_AUTH_OIDC_OIDC_ENDPOINT: Discovery endpoint
- SOCIAL_AUTH_OIDC_KEY: Client ID
- SOCIAL_AUTH_OIDC_SECRET: Client secret
- SOCIAL_AUTH_OIDC_NAME: Optional custom button text

Closes #140

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Brian Olson
2025-12-31 16:27:08 -05:00
parent 3aa321aff8
commit 33628af31f
4 changed files with 46 additions and 2 deletions

View File

@@ -141,6 +141,7 @@ AUTHENTICATION_BACKENDS = (
"social_core.backends.microsoft.MicrosoftOAuth2",
"social_core.backends.google.GoogleOAuth2",
"social_core.backends.auth0.Auth0OAuth2",
"social_core.backends.open_id_connect.OpenIdConnectAuth",
"django.contrib.auth.backends.ModelBackend",
)
@@ -188,6 +189,10 @@ for key in [
"SOCIAL_AUTH_AUTH0_DOMAIN",
"SOCIAL_AUTH_AUTH0_KEY",
"SOCIAL_AUTH_AUTH0_SECRET",
"SOCIAL_AUTH_OIDC_OIDC_ENDPOINT",
"SOCIAL_AUTH_OIDC_KEY",
"SOCIAL_AUTH_OIDC_SECRET",
"SOCIAL_AUTH_OIDC_NAME",
"CONNECTION_GATEWAY_AUTH_CA",
"CONNECTION_GATEWAY_AUTH_CERTIFICATE",
"CONNECTION_GATEWAY_AUTH_KEY",