---
phase: 01-authentication
plan: 06
type: execute
wave: 3
depends_on: ["01-05"]
files_modified: ["lib/features/authentication/presentation/pages/update_password_page.dart", "lib/features/authentication/data/repositories/auth_repository_impl.dart"]
autonomous: true
user_setup: []
must_haves:
truths:
- "Reset link redirects to password update page"
- "User can set new password successfully"
artifacts:
- path: "lib/features/authentication/presentation/pages/update_password_page.dart"
provides: "New password entry page"
min_lines: 40
- path: "lib/features/authentication/data/repositories/auth_repository_impl.dart"
provides: "Enhanced auth repository with password reset"
min_lines: 60
key_links:
- from: "lib/features/authentication/presentation/pages/update_password_page.dart"
to: "supabase.auth"
via: "password update flow"
pattern: "supabase\\.auth\\.updateUser|supabase\\.auth\\.resetPasswordForEmail"
---
Implement password update page and enhance repository for complete reset flow.
Purpose: Enable users to set new passwords from reset email links with proper validation.
Output: Password update interface with deep link handling and repository enhancements.
@~/.opencode/get-shit-done/workflows/execute-plan.md
@~/.opencode/get-shit-done/templates/summary.md
@.planning/PROJECT.md
@.planning/ROADMAP.md
@.planning/STATE.md
@.planning/phases/01-authentication/01-RESEARCH.md
Create password update page
lib/features/authentication/presentation/pages/update_password_page.dart
Create UpdatePasswordPage that:
1. Handles deep linking from password reset emails
2. Has new password input field with strength validation
3. Has confirm password field for validation
4. Uses AuthButton for "Update Password" action
5. Shows error messages for password mismatches
6. Shows loading state during password update
7. Navigates to login after successful password update
8. Handles expired/invalid reset tokens gracefully
9. Uses Supabase updateUser() method
10. Has proper error handling for various failure modes
11. Includes accessibility features
12. Has clear success messaging
13. Includes "Cancel" option to return to login
Password update page validates inputs, updates password successfully, and handles error cases
Complete password update interface with deep link handling
Update auth repository for password reset
lib/features/authentication/data/repositories/auth_repository_impl.dart
Extend AuthRepositoryImpl to:
1. Add updatePassword() method for new password setting
2. Handle password reset token verification
3. Improve resetPassword() method with proper redirect URL configuration
4. Add proper error handling for:
- Expired reset tokens
- Invalid reset tokens
- Weak passwords
- Network failures
5. Use supabase.auth.updateUser() for password updates
6. Ensure proper session handling after password update
7. Add comprehensive error mapping to custom exceptions
8. Include proper logging for debugging
Repository methods handle password reset flow from email to completion
Enhanced auth repository with complete password reset functionality
1. Password update page validates inputs and updates password successfully
2. Reset email contains working deep link to password update page
3. Error handling covers all failure scenarios (expired tokens, weak passwords, etc.)
4. Deep linking works on both mobile and web platforms
5. Navigation flows correctly from password update to login
Password update system working with deep link handling, validation, and repository integration.