diff --git a/src/app/(auth)/login/LoginContent.tsx b/src/app/(auth)/login/LoginContent.tsx
index f87dfb6..198d9c4 100644
--- a/src/app/(auth)/login/LoginContent.tsx
+++ b/src/app/(auth)/login/LoginContent.tsx
@@ -9,8 +9,6 @@ import { AuthLayout, AuthLayoutSocialButton } from '@components/auth/AuthLayout'
import { useLanguage } from '@i18n/LanguageProvider'
import { translations } from '@i18n/translations'
-import { WeChatIcon } from '../../components/icons/WeChatIcon'
-
type LoginContentProps = {
accountServiceBaseUrl: string
children?: ReactNode
@@ -52,10 +50,12 @@ export default function LoginContent({ accountServiceBaseUrl, children }: LoginC
[],
)
- const githubAuthUrl = process.env.NEXT_PUBLIC_GITHUB_AUTH_URL || '/api/auth/github'
- const wechatAuthUrl = process.env.NEXT_PUBLIC_WECHAT_AUTH_URL || '/api/auth/wechat'
const loginUrl = process.env.NEXT_PUBLIC_LOGIN_URL || `${accountServiceBaseUrl}/api/auth/login`
+ const socialButtonsDisabled = false
+ const githubAuthUrl = `${process.env.NEXT_PUBLIC_ACCOUNTS_SVC_URL}/api/auth/oauth/login/github`
+ const googleAuthUrl = `${process.env.NEXT_PUBLIC_ACCOUNTS_SVC_URL}/api/auth/oauth/login/google`
+
const loginUrlRef = useRef(loginUrl)
const deriveSameOriginLoginFallback = useCallback((url: string): string | undefined => {
@@ -103,7 +103,7 @@ export default function LoginContent({ accountServiceBaseUrl, children }: LoginC
loginUrlRef.current = loginUrl
}, [loginUrl])
- const socialButtonsDisabled = true
+
const initialAlert = useMemo(() => {
const successMessages: string[] = []
@@ -258,17 +258,17 @@ export default function LoginContent({ accountServiceBaseUrl, children }: LoginC
{
label: t.social.github,
href: githubAuthUrl,
- icon: ,
+ icon: ,
disabled: socialButtonsDisabled,
},
{
- label: t.social.wechat,
- href: wechatAuthUrl,
- icon: ,
+ label: "Google",
+ href: googleAuthUrl,
+ icon:
G
, // Replace with proper icon later if available
disabled: socialButtonsDisabled,
},
]
- }, [githubAuthUrl, socialButtonsDisabled, t.social.github, t.social.wechat, wechatAuthUrl])
+ }, [githubAuthUrl, googleAuthUrl, socialButtonsDisabled, t.social.github])
const formContent = useMemo(() => {
if (children) {
diff --git a/src/app/(auth)/register/RegisterContent.tsx b/src/app/(auth)/register/RegisterContent.tsx
index 162027c..0371868 100644
--- a/src/app/(auth)/register/RegisterContent.tsx
+++ b/src/app/(auth)/register/RegisterContent.tsx
@@ -20,7 +20,6 @@ import { AuthLayout, AuthLayoutSocialButton } from '@components/auth/AuthLayout'
import { useLanguage } from '@i18n/LanguageProvider'
import { translations } from '@i18n/translations'
-import { WeChatIcon } from '../../components/icons/WeChatIcon'
type AlertState = { type: 'error' | 'success' | 'info'; message: string }
@@ -37,9 +36,9 @@ export default function RegisterContent() {
const searchParams = useSearchParams()
const router = useRouter()
- const githubAuthUrl = process.env.NEXT_PUBLIC_GITHUB_AUTH_URL || '/api/auth/github'
- const wechatAuthUrl = process.env.NEXT_PUBLIC_WECHAT_AUTH_URL || '/api/auth/wechat'
- const isSocialAuthVisible = false
+ const isSocialAuthVisible = true
+ const githubAuthUrl = `${process.env.NEXT_PUBLIC_ACCOUNTS_SVC_URL}/api/auth/oauth/login/github`
+ const googleAuthUrl = `${process.env.NEXT_PUBLIC_ACCOUNTS_SVC_URL}/api/auth/oauth/login/google`
const socialButtons = useMemo(() => {
if (!isSocialAuthVisible) {
@@ -53,12 +52,12 @@ export default function RegisterContent() {
icon: ,
},
{
- label: t.social.wechat,
- href: wechatAuthUrl,
- icon: ,
+ label: "Google",
+ href: googleAuthUrl,
+ icon: G
,
},
]
- }, [githubAuthUrl, isSocialAuthVisible, t.social.github, t.social.wechat, wechatAuthUrl])
+ }, [githubAuthUrl, googleAuthUrl, isSocialAuthVisible, t.social.github])
useEffect(() => {
const sensitiveKeys = ['username', 'password', 'confirmPassword', 'email']