feat(01-06): create password update page with validation

- Implemented UpdatePasswordPage with password strength indicator
- Added password validation utility with comprehensive checks
- Enhanced AuthProvider with updatePasswordFromReset method
- Extended AuthRepository interface and implementation for password reset
- Added InvalidTokenException to auth exception hierarchy
- Includes accessibility features and error handling
- Password strength indicator with real-time feedback

Files:
- lib/features/authentication/presentation/pages/update_password_page.dart
- lib/core/utils/password_validator.dart
- lib/providers/auth_provider.dart
- lib/features/authentication/domain/repositories/auth_repository.dart
- lib/features/authentication/data/repositories/auth_repository_impl.dart
- lib/core/errors/auth_exceptions.dart
This commit is contained in:
Dani B
2026-01-28 12:05:15 -05:00
parent a9f1bf75e8
commit e56dd26fef
6 changed files with 616 additions and 1 deletions

View File

@@ -175,11 +175,26 @@ abstract class AuthRepository {
///
/// Creates an anonymous user session that can be upgraded to a full account later
///
/// Returns the anonymous [AuthUser] on successful sign in
/// Returns anonymous [AuthUser] on successful sign in
///
/// Throws:
/// - [NetworkException] if network connection fails
/// - [AuthDisabledException] if anonymous sign in is disabled
/// - [AuthException] for other authentication errors
Future<AuthUser> signInAnonymously();
/// Updates password from password reset token
///
/// This method is used when users click on password reset links
/// from their email. The reset token is typically extracted from
/// the deep link URL by the authentication system.
///
/// [newPassword] - The new password to set for the user
///
/// Throws:
/// - [InvalidTokenException] if reset token is expired or invalid
/// - [WeakPasswordException] if new password doesn't meet requirements
/// - [NetworkException] if network connection fails
/// - [AuthException] for other authentication errors
Future<void> updatePasswordFromReset(String newPassword);
}