forked from Tadrisino/MathApp_frontend
give the login-code request 45 s, since the backend now waits up to 40 s for Kavenegar
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -30,9 +30,14 @@ export const api = {
|
|||||||
guest: (deviceId: string) =>
|
guest: (deviceId: string) =>
|
||||||
http.post<T.AuthResponse>('/auth/session', { type: 'guest', deviceId }).then(saveTokens),
|
http.post<T.AuthResponse>('/auth/session', { type: 'guest', deviceId }).then(saveTokens),
|
||||||
|
|
||||||
/** گامِ ۱: پیامکِ کد. `devOtp` فقط وقتی سرور در حالتِ توسعه است برمیگردد. */
|
/**
|
||||||
|
* گامِ ۱: پیامکِ کد. `devOtp` فقط وقتی سرور در حالتِ توسعه است برمیگردد.
|
||||||
|
* مهلتِ ۴۵ ثانیه، نه ۱۵ِ پیشفرض: بکاند تا ۱۰+۳۰ ثانیه منتظرِ کاوهنگار میماند
|
||||||
|
* (۲۰۲۶-۰۹-۲۷، پیامک رسید ولی جوابِ کاوهنگار دیر آمد). اگر این زودتر قطع کند،
|
||||||
|
* کاربر «ارتباط برقرار نشد» میبیند در حالی که کد در گوشیاش است.
|
||||||
|
*/
|
||||||
requestOtp: (phone: string) =>
|
requestOtp: (phone: string) =>
|
||||||
http.post<{ success: boolean; devOtp?: string }>('/auth/otp/request', { phone }),
|
http.post<{ success: boolean; devOtp?: string }>('/auth/otp/request', { phone }, { timeoutMs: 45_000 }),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* گامِ ۲: تأییدِ کد. اگر الان مهمان باشد، سرور همان کاربر را نگه میدارد و
|
* گامِ ۲: تأییدِ کد. اگر الان مهمان باشد، سرور همان کاربر را نگه میدارد و
|
||||||
|
|||||||
Reference in New Issue
Block a user