mirror of
https://github.com/Eugeny/tabby-web.git
synced 2026-08-17 06:46:05 +01:00
feat: dynamic auth providers + Auth0 support
- Add /api/1/auth/providers endpoint that returns only configured providers - Frontend fetches available providers dynamically instead of hardcoding - Only providers with credentials set (KEY + SECRET) appear as login options - Add Auth0 as a supported authentication provider - Add python-jose[cryptography] dependency for Auth0 JWT verification - Show helpful message when no providers are configured This makes the login page modular - administrators only see buttons for providers they've actually configured, avoiding confusion from dead buttons. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -140,10 +140,15 @@ AUTHENTICATION_BACKENDS = (
|
||||
"social_core.backends.azuread.AzureADOAuth2",
|
||||
"social_core.backends.microsoft.MicrosoftOAuth2",
|
||||
"social_core.backends.google.GoogleOAuth2",
|
||||
"social_core.backends.auth0.Auth0OAuth2",
|
||||
"django.contrib.auth.backends.ModelBackend",
|
||||
)
|
||||
|
||||
SOCIAL_AUTH_GITHUB_SCOPE = ["read:user", "user:email"]
|
||||
SOCIAL_AUTH_AUTH0_SCOPE = ["openid", "profile", "email"]
|
||||
SOCIAL_AUTH_AUTH0_EXTRA_DATA = ["id_token"]
|
||||
# Auth0 uses RS256 for ID tokens
|
||||
SOCIAL_AUTH_ALLOWED_REDIRECT_HOSTS = ["*"]
|
||||
SOCIAL_AUTH_PIPELINE = (
|
||||
"social_core.pipeline.social_auth.social_details",
|
||||
"social_core.pipeline.social_auth.social_uid",
|
||||
@@ -180,6 +185,9 @@ for key in [
|
||||
"SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET",
|
||||
"SOCIAL_AUTH_MICROSOFT_GRAPH_KEY",
|
||||
"SOCIAL_AUTH_MICROSOFT_GRAPH_SECRET",
|
||||
"SOCIAL_AUTH_AUTH0_DOMAIN",
|
||||
"SOCIAL_AUTH_AUTH0_KEY",
|
||||
"SOCIAL_AUTH_AUTH0_SECRET",
|
||||
"CONNECTION_GATEWAY_AUTH_CA",
|
||||
"CONNECTION_GATEWAY_AUTH_CERTIFICATE",
|
||||
"CONNECTION_GATEWAY_AUTH_KEY",
|
||||
|
||||
Reference in New Issue
Block a user