mirror of
https://github.com/samanhappy/mcphub.git
synced 2026-01-01 04:08:52 -05:00
feat: Add OAuth 2.0 / OIDC SSO login support
- Add OAuth SSO provider configuration types (OAuthSsoProviderConfig, OAuthSsoConfig) - Create OAuth SSO service with support for Google, Microsoft, GitHub, and custom OIDC providers - Implement OAuth SSO controller with endpoints for SSO configuration, login initiation, and callback handling - Add routes for /api/auth/sso/* endpoints - Update User entity and DAOs to support OAuth-linked accounts (oauthProvider, oauthSubject, email, displayName, avatarUrl) - Update SystemConfig entity to include oauthSso field - Update migration utility to handle OAuth SSO configuration and user fields - Add OAuth callback page for frontend token handling - Update LoginPage with SSO provider buttons and hybrid auth support - Add i18n translations for OAuth SSO (English and Chinese) - Add comprehensive tests for OAuth SSO service (13 new tests) Co-authored-by: samanhappy <2755122+samanhappy@users.noreply.github.com>
This commit is contained in:
@@ -840,5 +840,25 @@
|
||||
"internalError": "Internal Error",
|
||||
"internalErrorMessage": "An unexpected error occurred while processing the OAuth callback.",
|
||||
"closeWindow": "Close Window"
|
||||
},
|
||||
"oauthSso": {
|
||||
"errors": {
|
||||
"providerIdRequired": "Provider ID is required",
|
||||
"providerNotFound": "OAuth provider not found",
|
||||
"missingState": "Missing OAuth state parameter",
|
||||
"missingCode": "Missing authorization code",
|
||||
"invalidState": "Invalid or expired OAuth state",
|
||||
"authFailed": "OAuth authentication failed",
|
||||
"userNotProvisioned": "User not found and auto-provisioning is disabled"
|
||||
},
|
||||
"signInWith": "Sign in with {{provider}}",
|
||||
"orContinueWith": "Or continue with",
|
||||
"continueWithProvider": "Continue with {{provider}}",
|
||||
"loginWithSso": "Login with SSO",
|
||||
"providers": {
|
||||
"google": "Google",
|
||||
"microsoft": "Microsoft",
|
||||
"github": "GitHub"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -842,5 +842,25 @@
|
||||
"internalError": "内部错误",
|
||||
"internalErrorMessage": "处理 OAuth 回调时发生意外错误。",
|
||||
"closeWindow": "关闭窗口"
|
||||
},
|
||||
"oauthSso": {
|
||||
"errors": {
|
||||
"providerIdRequired": "需要提供身份验证提供商 ID",
|
||||
"providerNotFound": "未找到 OAuth 身份验证提供商",
|
||||
"missingState": "缺少 OAuth 状态参数",
|
||||
"missingCode": "缺少授权码",
|
||||
"invalidState": "OAuth 状态无效或已过期",
|
||||
"authFailed": "OAuth 身份验证失败",
|
||||
"userNotProvisioned": "用户未找到且自动创建用户已禁用"
|
||||
},
|
||||
"signInWith": "使用 {{provider}} 登录",
|
||||
"orContinueWith": "或使用以下方式继续",
|
||||
"continueWithProvider": "使用 {{provider}} 继续",
|
||||
"loginWithSso": "使用 SSO 登录",
|
||||
"providers": {
|
||||
"google": "Google",
|
||||
"microsoft": "Microsoft",
|
||||
"github": "GitHub"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user