feat(FN-1899): implement login timeout, cancellation, and 409 conflict handling
- Add login outcome types (timeout, success, failed) and state tracking via stepData - Implement login timeout after MAX_POLL_CYCLES (150 polls × 2s = 5 minutes) with warning toast - Add 409 Conflict detection for concurrent login attempts with warning toast - Add cancellation capability for in-progress logins with cleanup and state reset - Update ModelOnboardingModal tests to cover timeout and concurrent login scenarios
This commit is contained in:
@@ -248,7 +248,7 @@ export function ModelOnboardingModal({
|
||||
}
|
||||
setAuthActionInProgress(null);
|
||||
setLoginOutcomes((prev) => ({ ...prev, [providerId]: "timeout" }));
|
||||
addToast("Login timed out. Please try again.", "info");
|
||||
addToast("Login timed out. Please try again.", "warning");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ export function ModelOnboardingModal({
|
||||
(err && typeof err === "object" && "status" in err && (err as { status: number }).status === 409);
|
||||
|
||||
if (isConcurrentLogin) {
|
||||
addToast("Login already in progress. Please wait or cancel the current attempt.", "info");
|
||||
addToast("Login already in progress. Please wait or cancel the current attempt.", "warning");
|
||||
setLoginOutcomes((prev) => ({ ...prev, [providerId]: "failed" }));
|
||||
} else {
|
||||
addToast(err instanceof Error ? err.message : "Login failed", "error");
|
||||
|
||||
Reference in New Issue
Block a user