fix: support VK ID OAuth 2.1 device_id in frontend

- Extract device_id from VK callback URL query params
- Pass device_id through store → API → backend
- Add useRef guard to prevent useEffect double-fire
- Fix URL validation catch-block anti-pattern in Login
- Improve error extraction in OAuthCallback (show Error.message)
This commit is contained in:
Fringg
2026-03-02 04:10:05 +03:00
parent 3f050396b8
commit 60f16e64e8
4 changed files with 28 additions and 13 deletions

View File

@@ -174,6 +174,7 @@ export const authApi = {
provider: string,
code: string,
state: string,
deviceId?: string | null,
campaignSlug?: string | null,
referralCode?: string | null,
): Promise<AuthResponse> => {
@@ -182,6 +183,7 @@ export const authApi = {
{
code,
state,
device_id: deviceId || undefined,
campaign_slug: campaignSlug || undefined,
referral_code: referralCode || undefined,
},