AOSSIE-Org / AOSSIE-Org/DebateAI

Issue: Persistent Error Notification in Auth Flow

Ouverte
#214 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
TypeScript
Étoiles
84
Forks
198
Merge moyen
2 j 19 h
PR mergées (30 j)
30

Description

**Description**
The authentication error notification (e.g., "Login failed") persists in the UI even after the user has switched context. For example, if a user fails to log in and then navigates to the Sign Up or OTP Verification screens, the red "Login failed" error message remains visible. This creates a confusing user experience, as the error state does not reflect the current active form.

Image

**Proposed Changes**

#### 1. Global State Management (`authContext.tsx`)
* **Expose Reset Action:** Add a `clearError` function to the `AuthContext` interface and provider.
* *Goal:* Provide a centralized way for components to reset the global `error` string to `null` without triggering a full page reload or logout.

#### 2. Component Logic (`Authentication.tsx`)
* **Trigger Reset on Navigation:** Update the `toggleAuthMode`, `startOtpVerification`, and `startForgotPassword` handlers to invoke `clearError()` immediately before changing the `authMode` state.
* *Goal:* Ensure that every time the user transitions to a new authentication phase (Login → Signup → OTP), the UI starts with a clean slate, automatically removing stale error messages from previous attempts.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.