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

@@ -12,7 +12,13 @@ export interface User {
referral_code: string | null;
language: string;
created_at: string;
auth_type: 'telegram' | 'email'; // Тип аутентификации
auth_type: 'telegram' | 'email' | 'google' | 'yandex' | 'discord' | 'vk'; // Тип аутентификации
}
// OAuth types
export interface OAuthProvider {
name: string;
display_name: string;
}
// Auth types