AOSSIE-Org / AOSSIE-Org/DebateAI

Issue: Persistent Error Notification in Auth Flow

Abierto
#214 2 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
84
Forks
198
Merge medio
2 d 19 h
PR fusionados (30 d)
30

Descripción

**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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.