feat: add OAuth 2.0 login UI (Google, Yandex, Discord, VK)

- Add OAuthProvider type and extend User.auth_type union
- Add OAuth API methods (providers, authorize, callback)
- Add loginWithOAuth to auth store
- Create OAuthCallback page with state validation
- Create OAuthProviderIcon component with brand SVGs
- Add OAuth buttons to Login page between Telegram and Email
- Add OAuth callback route to App.tsx
- Add translations for ru, en, zh, fa
This commit is contained in:
Fringg
2026-02-07 01:59:05 +03:00
parent af25e6a1b8
commit 83aeae81b8
12 changed files with 329 additions and 6 deletions

View File

@@ -187,7 +187,13 @@
"forgotPasswordHint": "Enter your email to receive a reset link",
"loginSuccess": "Login successful",
"passwordResetSent": "Password reset link sent to your email",
"sendResetLink": "Send reset link"
"sendResetLink": "Send reset link",
"continueWithGoogle": "Continue with Google",
"continueWithYandex": "Continue with Yandex",
"continueWithDiscord": "Continue with Discord",
"continueWithVk": "Continue with VK",
"oauthError": "Authorization was denied or failed",
"oauthExpired": "OAuth session expired. Please try again."
},
"emailVerification": {
"title": "Email Verification",

View File

@@ -181,7 +181,13 @@
"passwordTooShort": "رمز عبور باید حداقل ۸ کاراکتر باشد",
"sendResetLink": "ارسال لینک بازنشانی",
"tooManyAttempts": "تلاش‌های زیاد. لطفاً بعداً امتحان کنید",
"verificationEmailNotice": "پس از ثبت نام، ایمیل تأیید به آدرس شما ارسال خواهد شد"
"verificationEmailNotice": "پس از ثبت نام، ایمیل تأیید به آدرس شما ارسال خواهد شد",
"continueWithGoogle": "ادامه با Google",
"continueWithYandex": "ادامه با Yandex",
"continueWithDiscord": "ادامه با Discord",
"continueWithVk": "ادامه با VK",
"oauthError": "مجوز رد شد یا ناموفق بود",
"oauthExpired": "نشست OAuth منقضی شده است. لطفاً دوباره امتحان کنید."
},
"emailVerification": {
"title": "تایید ایمیل",

View File

@@ -190,7 +190,13 @@
"clickLinkToVerify": "Перейдите по ссылке в письме, чтобы подтвердить аккаунт и войти.",
"backToLogin": "Вернуться ко входу",
"emailNotVerified": "Сначала подтвердите email",
"loginSuccess": "Авторизация успешна"
"loginSuccess": "Авторизация успешна",
"continueWithGoogle": "Продолжить через Google",
"continueWithYandex": "Продолжить через Яндекс",
"continueWithDiscord": "Продолжить через Discord",
"continueWithVk": "Продолжить через VK",
"oauthError": "Авторизация отклонена или не удалась",
"oauthExpired": "Сессия OAuth истекла. Попробуйте снова."
},
"emailVerification": {
"title": "Подтверждение email",

View File

@@ -181,7 +181,13 @@
"passwordTooShort": "密码至少需要8个字符",
"sendResetLink": "发送重置链接",
"tooManyAttempts": "尝试次数过多,请稍后再试",
"verificationEmailNotice": "注册后,验证邮件将发送到您的邮箱"
"verificationEmailNotice": "注册后,验证邮件将发送到您的邮箱",
"continueWithGoogle": "通过 Google 继续",
"continueWithYandex": "通过 Yandex 继续",
"continueWithDiscord": "通过 Discord 继续",
"continueWithVk": "通过 VK 继续",
"oauthError": "授权被拒绝或失败",
"oauthExpired": "OAuth 会话已过期。请重试。"
},
"emailVerification": {
"title": "邮箱验证",