Pantalla: Recuperacion de Cuenta
Identificador: SCR-AUTH-004
Modulo: MTS-AUTH-001 - Autenticacion y Seguridad
Version: 1.0.0
Fecha: 2025-12-05
Autor: MobileUxUiDrone (Eight of Eight)
Estado: Especificado
| Atributo |
Valor |
| Nombre |
Recuperacion de Cuenta |
| Proposito |
Opciones para recuperar acceso a cuenta |
| Tipo |
Full Screen con navigation |
| Acceso |
Desde SCR-AUTH-002 o deep link |
| Prioridad |
Alta |
2. Wireframe ASCII
2.1. Estado: Opciones de Recuperacion
+------------------------------------------+
| [<-] Recuperar acceso | <- Top App Bar
+------------------------------------------+
| |
| +----------+ |
| | [?] | | <- Help icon
| +----------+ |
| |
| No puedes acceder a tu |
| cuenta? |
| |
| Selecciona como quieres recuperar |
| tu acceso: |
| |
| +------------------------------------+ |
| | [G] | |
| | Inicia sesion con Google | |
| | Si creaste tu cuenta con Google, | |
| | usa este metodo. | |
| +------------------------------------+ |
| |
| +------------------------------------+ |
| | [Apple] | |
| | Inicia sesion con Apple | |
| | Si creaste tu cuenta con Apple, | |
| | usa este metodo. | |
| +------------------------------------+ |
| |
| +------------------------------------+ |
| | [Key] | |
| | Usar Recovery Key | |
| | Solo tier Perfect. Necesitas tu | |
| | clave de recuperacion de 24 | |
| | palabras. | |
| +------------------------------------+ |
| |
| No encuentras tu cuenta? |
| [Contactar soporte] |
| |
+------------------------------------------+
2.2. Estado: Reinicio Tier Free (Advertencia)
+------------------------------------------+
| [<-] Recuperar acceso |
+------------------------------------------+
| |
| +------------------------------------+ |
| | | |
| | [Warning Icon - Amarillo] | |
| | | |
| | Cuenta sin respaldo | |
| | | |
| | Tu cuenta es tier Free y tus | |
| | datos estan solo en tu | |
| | dispositivo. | |
| | | |
| | Si olvidaste tu PIN, la unica | |
| | opcion es reiniciar la app. | |
| | Esto BORRARA todos tus datos. | |
| | | |
| | +------------------------------+ | |
| | | Reiniciar app (borrar datos)| | |
| | +------------------------------+ | |
| | | |
| | [Recordar PIN] [Contactar soporte]| |
| | | |
| +------------------------------------+ |
| |
| |
| Evita esto en el futuro: |
| Actualiza a Pro o Perfect para |
| respaldo en la nube. |
| [Ver planes] |
| |
+------------------------------------------+
+------------------------------------------+
| [<-] Recovery Key |
+------------------------------------------+
| |
| Ingresa tu Recovery Key |
| |
| Ingresa las 24 palabras de tu clave |
| de recuperacion, separadas por |
| espacios. |
| |
| +------------------------------------+ |
| | | |
| | [TextArea - multiline] | |
| | Ejemplo: apple banana cherry ... | |
| | | |
| +------------------------------------+ |
| |
| 12 de 24 palabras |
| |
| +------------------------------------+ |
| | Verificar clave | |
| +------------------------------------+ |
| |
| |
| Donde encuentro mi Recovery Key? |
| La recibiste cuando configuraste |
| MFA. Debe estar guardada en un |
| lugar seguro. |
| |
| [No tengo mi Recovery Key] |
| |
+------------------------------------------+
2.4. Estado: Confirmacion de Reinicio
+------------------------------------------+
| |
| +------------------------------------+ |
| | | |
| | [Danger Icon - Rojo] | |
| | | |
| | Estas seguro? | |
| | | |
| | Esta accion ELIMINARA: | |
| | | |
| | - Todos tus medicamentos | |
| | - Tu historial de tomas | |
| | - Tus configuraciones | |
| | - Tus datos de cuidadores | |
| | | |
| | Esta accion NO SE PUEDE | |
| | deshacer. | |
| | | |
| | Escribe BORRAR para confirmar: | |
| | +------------------------------+ | |
| | | [ ]| | |
| | +------------------------------+ | |
| | | |
| | +------------------------------+ | |
| | | Eliminar todos mis datos | | |
| | +------------------------------+ | |
| | | |
| | [Cancelar] | |
| | | |
| +------------------------------------+ |
| |
+------------------------------------------+
3. Componentes UI
3.1. Top App Bar
| Propiedad |
Valor |
| Componente |
CMP-NAV-002 |
| Titulo |
"Recuperar acceso" |
| Leading |
Back arrow |
3.2. Recovery Option Card
| Propiedad |
Valor |
| Componente |
CMP-CRD-008 (Action Card) |
| Layout |
Icon left, title + subtitle right |
| Height |
Auto (content-based) |
| Padding |
16dp |
| Touch target |
Full card |
3.3. Warning Card (Free Reset)
| Propiedad |
Valor |
| Componente |
CMP-FBK-004 (Banner) |
| Variante |
warning |
| Icono |
Warning triangle |
| Background |
warning.light |
| Border |
2dp warning.main |
3.4. Danger Card (Confirmation)
| Propiedad |
Valor |
| Componente |
CMP-FBK-002 (Dialog) |
| Variante |
destructive |
| Icono |
Danger icon (red) |
| Boton destructivo |
error background |
| Propiedad |
Valor |
| Componente |
CMP-INP-009 (TextArea) |
| Multiline |
true |
| Min lines |
4 |
| Max lines |
6 |
| Hint |
"apple banana cherry..." |
| Character counter |
Word counter (24) |
| Propiedad |
Valor |
| Componente |
CMP-INP-001 (Text Field) |
| Expected value |
"BORRAR" |
| Case sensitive |
false |
| Validation |
Exacta coincidencia |
4. Comportamientos
4.1. Logica de Opciones
flowchart TD
A[Pantalla Recuperacion] --> B{Tipo de cuenta detectada?}
B -->|No detectada| C[Mostrar todas las opciones]
B -->|Free local| D[Mostrar warning reinicio]
B -->|Pro/Perfect con Google| E[Highlight Google option]
B -->|Pro/Perfect con Apple| F[Highlight Apple option]
C --> G{Seleccion usuario}
D --> G
E --> G
F --> G
G -->|Google| H[OAuth Google]
G -->|Apple| I[OAuth Apple]
G -->|Recovery Key| J[Input 24 palabras]
G -->|Reiniciar| K[Confirmacion destructiva]
H -->|Exito| L[Dashboard]
I -->|Exito| L
J -->|Valido| M[Restaurar cuenta]
M --> L
K -->|Confirmado| N[Borrar datos + Splash]
4.2. Validacion Recovery Key
stateDiagram-v2
[*] --> Empty: Pantalla cargada
Empty --> Partial: Usuario escribe
Partial --> Partial: Menos de 24 palabras
Partial --> Complete: 24 palabras
Complete --> Validating: Tap Verificar
Validating --> Valid: Clave correcta
Validating --> Invalid: Clave incorrecta
Valid --> [*]: Restaurar cuenta
Invalid --> Error: Mostrar error
Error --> Partial: Usuario corrige
5. Estados y Transiciones
5.1. Diagrama de Estados Principal
stateDiagram-v2
[*] --> Options: Pantalla cargada
Options --> OAuthGoogle: Tap Google
Options --> OAuthApple: Tap Apple
Options --> RecoveryKeyInput: Tap Recovery Key
Options --> FreeWarning: Tap Reiniciar (tier Free)
OAuthGoogle --> Dashboard: Exito
OAuthApple --> Dashboard: Exito
RecoveryKeyInput --> Validating: Submit 24 palabras
Validating --> Dashboard: Clave valida
Validating --> RecoveryKeyInput: Clave invalida
FreeWarning --> ConfirmReset: Tap Reiniciar
ConfirmReset --> ResetComplete: Escribir "BORRAR" + confirmar
ConfirmReset --> FreeWarning: Cancelar
ResetComplete --> [*]: App reiniciada
Dashboard --> [*]
6. Manejo de Errores
6.1. Recovery Key Invalida
+------------------------------------------+
| +------------------------------------+ |
| | [X] Recovery Key invalida | |
| | | |
| | La clave ingresada no es correcta. | |
| | Verifica que: | |
| | - Todas las 24 palabras esten | |
| | correctas | |
| | - El orden sea el correcto | |
| | - No haya espacios extra | |
| | | |
| | [Intentar de nuevo] | |
| +------------------------------------+ |
+------------------------------------------+
6.2. OAuth Fallido
| Error |
Mensaje |
Accion |
| Account not found |
"No encontramos una cuenta con ese email." |
Link crear cuenta |
| Network error |
"Sin conexion. Verifica tu internet." |
Retry |
| Provider error |
"Error con {provider}. Intenta de nuevo." |
Retry |
7. Accesibilidad
7.1. Labels y Hints
| Elemento |
accessibilityLabel |
accessibilityHint |
| Back |
"Volver" |
"Regresa a inicio de sesion" |
| Google option |
"Recuperar con Google" |
"Inicia sesion con tu cuenta de Google asociada" |
| Apple option |
"Recuperar con Apple" |
"Inicia sesion con tu cuenta de Apple asociada" |
| Recovery Key option |
"Usar Recovery Key" |
"Ingresa tu clave de 24 palabras" |
| Recovery Key input |
"Clave de recuperacion" |
"Ingresa las 24 palabras separadas por espacios" |
| Confirm BORRAR |
"Confirmacion de borrado" |
"Escribe BORRAR para confirmar" |
7.2. Orden de Foco
7.2.1. Pantalla Opciones
- Back button
- Titulo
- Opcion Google
- Opcion Apple
- Opcion Recovery Key
- Link Contactar soporte
7.2.2. Pantalla Recovery Key
- Back button
- Instrucciones
- TextArea input
- Word counter
- Boton Verificar
- Link ayuda
7.3. Screen Reader Announcements
| Evento |
Anuncio |
| Pantalla cargada |
"Recuperar acceso. Selecciona una opcion" |
| Recovery key validating |
"Verificando clave de recuperacion..." |
| Recovery key valid |
"Clave valida. Restaurando cuenta..." |
| Recovery key invalid |
"Clave invalida. Verifica e intenta de nuevo" |
| Reset warning |
"Advertencia: Reiniciar eliminara todos tus datos" |
| Reset confirmed |
"Datos eliminados. Reiniciando app" |
8. Seguridad
8.1. Recovery Key Handling
| Aspecto |
Implementacion |
| Input masking |
No (palabras visibles para verificacion) |
| Clipboard |
Permitir paste |
| Logging |
Nunca loguear recovery key |
| Memory |
Clear de memoria despues de uso |
| Rate limiting |
5 intentos, luego 15 min cooldown |
8.2. Confirmacion Destructiva
| Proteccion |
Implementacion |
| Confirmacion textual |
Escribir "BORRAR" exacto |
| Delay |
3 segundos antes de habilitar boton |
| No auto-complete |
Input no sugiere |
| Logging |
Registrar evento (sin datos personales) |
9. Datos Requeridos
interface RecoveryScreenData {
detectedAccountType?: 'free' | 'pro' | 'perfect';
detectedProvider?: 'google' | 'apple';
hasLocalData: boolean;
}
9.2. Output Events
| Evento |
Payload |
Destino |
| onBack |
- |
SCR-AUTH-002 |
| onRecoverGoogle |
google_token |
Dashboard |
| onRecoverApple |
apple_token |
Dashboard |
| onRecoveryKeySubmit |
words[] |
Validation |
| onRecoveryKeyValid |
- |
Dashboard |
| onResetConfirm |
- |
Clear data + Splash |
| onContactSupport |
- |
External support |
10. Metricas
10.1. Analytics Events
| Evento |
Parametros |
| screen_view |
screen_name: "recovery" |
| recovery_option_view |
option: "google"/"apple"/"recovery_key"/"reset" |
| recovery_attempt |
method |
| recovery_success |
method, time_ms |
| recovery_error |
method, error_code |
| recovery_key_attempt |
- |
| recovery_key_success |
- |
| recovery_key_failure |
attempt_number |
| reset_warning_shown |
- |
| reset_confirmed |
- |
| reset_cancelled |
- |
| support_contact |
from_screen |
11. Referencias
Documento generado por MobileUxUiDrone (Eight of Eight)