fix(01): resolve checker blocker issues
- Create missing Plan 01-07 (password reset navigation) - Update Plan 01-10 to contain logout functionality (covers AUTH-05) - Split Plan 01-04 into Plans 01-04 and 01-11 (2-3 tasks each) - Fix dependency references throughout phase - Update ROADMAP.md to reflect 11 plans in 4 waves
This commit is contained in:
@@ -25,13 +25,14 @@ Research validated three phases (MVP, expansion, differentiation); comprehensive
|
|||||||
|
|
||||||
**Dependencies:** None (foundational)
|
**Dependencies:** None (foundational)
|
||||||
|
|
||||||
**Plans:** 10 plans in 4 waves
|
**Plans:** 11 plans in 4 waves
|
||||||
|
|
||||||
Plans:
|
Plans:
|
||||||
- [ ] 01-01-PLAN.md — Flutter project foundation with Supabase integration
|
- [ ] 01-01-PLAN.md — Flutter project foundation with Supabase integration
|
||||||
- [ ] 01-02-PLAN.md — Authentication models, exceptions, and repository interface
|
- [ ] 01-02-PLAN.md — Authentication models, exceptions, and repository interface
|
||||||
- [ ] 01-03-PLAN.md — Authentication UI screens and form components
|
- [ ] 01-03-PLAN.md — Authentication UI screens and form components
|
||||||
- [ ] 01-04-PLAN.md — Auth state management, Supabase implementation, and navigation
|
- [ ] 01-04-PLAN.md — Authentication repository and state management
|
||||||
|
- [ ] 01-11-PLAN.md — Auth-aware navigation system and app integration
|
||||||
- [ ] 01-05-PLAN.md — Password reset request interface and form components
|
- [ ] 01-05-PLAN.md — Password reset request interface and form components
|
||||||
- [ ] 01-06-PLAN.md — Password update page and repository enhancements
|
- [ ] 01-06-PLAN.md — Password update page and repository enhancements
|
||||||
- [ ] 01-07-PLAN.md — Password reset navigation and deep linking
|
- [ ] 01-07-PLAN.md — Password reset navigation and deep linking
|
||||||
|
|||||||
@@ -4,38 +4,27 @@ plan: 04
|
|||||||
type: execute
|
type: execute
|
||||||
wave: 2
|
wave: 2
|
||||||
depends_on: ["01-01", "01-02"]
|
depends_on: ["01-01", "01-02"]
|
||||||
files_modified: ["lib/providers/auth_provider.dart", "lib/features/authentication/data/repositories/auth_repository_impl.dart", "lib/app/router.dart", "lib/presentation/pages/splash_page.dart"]
|
files_modified: ["lib/features/authentication/data/repositories/auth_repository_impl.dart", "lib/providers/auth_provider.dart"]
|
||||||
autonomous: true
|
autonomous: true
|
||||||
user_setup: []
|
user_setup: []
|
||||||
|
|
||||||
must_haves:
|
must_haves:
|
||||||
truths:
|
truths:
|
||||||
- "Auth state changes trigger UI updates automatically"
|
|
||||||
- "Navigation works based on authentication status"
|
|
||||||
- "Auth repository implementation connects to Supabase"
|
- "Auth repository implementation connects to Supabase"
|
||||||
|
- "Auth state changes trigger UI updates automatically"
|
||||||
- "Session persists across app restarts"
|
- "Session persists across app restarts"
|
||||||
artifacts:
|
artifacts:
|
||||||
- path: "lib/providers/auth_provider.dart"
|
|
||||||
provides: "Global auth state management"
|
|
||||||
min_lines: 35
|
|
||||||
- path: "lib/features/authentication/data/repositories/auth_repository_impl.dart"
|
- path: "lib/features/authentication/data/repositories/auth_repository_impl.dart"
|
||||||
provides: "Supabase auth implementation"
|
provides: "Supabase auth implementation"
|
||||||
min_lines: 50
|
min_lines: 50
|
||||||
- path: "lib/app/router.dart"
|
- path: "lib/providers/auth_provider.dart"
|
||||||
provides: "Auth-based navigation"
|
provides: "Global auth state management"
|
||||||
min_lines: 40
|
min_lines: 35
|
||||||
- path: "lib/presentation/pages/splash_page.dart"
|
|
||||||
provides: "Initial loading screen"
|
|
||||||
min_lines: 20
|
|
||||||
key_links:
|
key_links:
|
||||||
- from: "lib/providers/auth_provider.dart"
|
- from: "lib/providers/auth_provider.dart"
|
||||||
to: "lib/features/authentication/data/repositories/auth_repository_impl.dart"
|
to: "lib/features/authentication/data/repositories/auth_repository_impl.dart"
|
||||||
via: "dependency injection"
|
via: "dependency injection"
|
||||||
pattern: "AuthRepository|_authRepository"
|
pattern: "AuthRepository|_authRepository"
|
||||||
- from: "lib/providers/auth_provider.dart"
|
|
||||||
to: "lib/app/router.dart"
|
|
||||||
via: "auth state listening"
|
|
||||||
pattern: "onAuthStateChange|authStateChanges"
|
|
||||||
- from: "lib/features/authentication/data/repositories/auth_repository_impl.dart"
|
- from: "lib/features/authentication/data/repositories/auth_repository_impl.dart"
|
||||||
to: "supabase.auth"
|
to: "supabase.auth"
|
||||||
via: "Supabase client usage"
|
via: "Supabase client usage"
|
||||||
@@ -43,10 +32,10 @@ must_haves:
|
|||||||
---
|
---
|
||||||
|
|
||||||
<objective>
|
<objective>
|
||||||
Implement authentication state management, Supabase repository, and navigation system.
|
Implement authentication repository and state management.
|
||||||
|
|
||||||
Purpose: Connect UI components to Supabase authentication, manage auth state globally, and handle navigation based on user authentication status.
|
Purpose: Connect UI components to Supabase authentication and manage auth state globally.
|
||||||
Output: Working authentication system with session persistence and protected routes.
|
Output: Working authentication system with session persistence and state management.
|
||||||
</objective>
|
</objective>
|
||||||
|
|
||||||
<execution_context>
|
<execution_context>
|
||||||
@@ -111,66 +100,18 @@ Output: Working authentication system with session persistence and protected rou
|
|||||||
<done>Global auth state management that automatically responds to authentication changes</done>
|
<done>Global auth state management that automatically responds to authentication changes</done>
|
||||||
</task>
|
</task>
|
||||||
|
|
||||||
<task type="auto">
|
|
||||||
<name>Create auth-aware navigation system</name>
|
|
||||||
<files>lib/app/router.dart, lib/presentation/pages/splash_page.dart</files>
|
|
||||||
<action>
|
|
||||||
Create navigation system with:
|
|
||||||
|
|
||||||
1. SplashPage that:
|
|
||||||
- Shows while checking initial auth state
|
|
||||||
- Navigates to login or home after auth check
|
|
||||||
- Has proper loading indicator
|
|
||||||
- Handles app startup sequence
|
|
||||||
|
|
||||||
2. Router configuration that:
|
|
||||||
- Uses GoRouter for declarative routing
|
|
||||||
- Has protected routes (redirect to login if not authenticated)
|
|
||||||
- Has public routes (login, signup, password reset)
|
|
||||||
- Listens to AuthProvider for auth state changes
|
|
||||||
- Includes proper route definitions:
|
|
||||||
- / → redirect based on auth state
|
|
||||||
- /login → login page
|
|
||||||
- /signup → signup page
|
|
||||||
- /home → protected home route (placeholder)
|
|
||||||
- Handles deep linking properly
|
|
||||||
- Includes proper error handling for navigation
|
|
||||||
</action>
|
|
||||||
<verify>Navigation correctly redirects based on authentication status and all routes are accessible</verify>
|
|
||||||
<done>Complete navigation system that protects routes and responds to authentication changes</done>
|
|
||||||
</task>
|
|
||||||
|
|
||||||
<task type="auto">
|
|
||||||
<name>Integrate auth system with main app</name>
|
|
||||||
<files>lib/main.dart</files>
|
|
||||||
<action>
|
|
||||||
Update main.dart to:
|
|
||||||
1. Wrap MyApp with appropriate providers (Riverpod/ChangeNotifierProvider)
|
|
||||||
2. Initialize AuthProvider with AuthRepositoryImpl
|
|
||||||
3. Configure router with auth state integration
|
|
||||||
4. Set up proper error boundaries
|
|
||||||
5. Ensure proper initialization order
|
|
||||||
6. Add proper app structure with MaterialApp.router
|
|
||||||
7. Configure theme and other app-level settings
|
|
||||||
8. Ensure proper disposal of resources
|
|
||||||
</action>
|
|
||||||
<verify>App starts with splash screen, properly checks auth state, and navigates to appropriate initial screen</verify>
|
|
||||||
<done>Complete app integration with authentication system</done>
|
|
||||||
</task>
|
|
||||||
|
|
||||||
</tasks>
|
</tasks>
|
||||||
|
|
||||||
<verification>
|
<verification>
|
||||||
1. Authentication repository successfully connects to Supabase and handles all auth methods
|
1. Authentication repository successfully connects to Supabase and handles all auth methods
|
||||||
2. State management responds correctly to auth state changes
|
2. State management responds correctly to auth state changes
|
||||||
3. Navigation system properly protects routes and redirects based on auth status
|
3. Session persistence works across app restarts
|
||||||
4. Session persistence works across app restarts
|
4. Error handling provides user-friendly feedback
|
||||||
5. Error handling provides user-friendly feedback
|
5. Loading states work properly during authentication operations
|
||||||
6. Loading states work properly during authentication operations
|
|
||||||
</verification>
|
</verification>
|
||||||
|
|
||||||
<success_criteria>
|
<success_criteria>
|
||||||
Complete authentication system with Supabase integration, state management, and protected navigation ready for UI connection.
|
Complete authentication repository and state management system ready for navigation integration.
|
||||||
</success_criteria>
|
</success_criteria>
|
||||||
|
|
||||||
<output>
|
<output>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ phase: 01-authentication
|
|||||||
plan: 05
|
plan: 05
|
||||||
type: execute
|
type: execute
|
||||||
wave: 3
|
wave: 3
|
||||||
depends_on: ["01-03", "01-04"]
|
depends_on: ["01-03", "01-11"]
|
||||||
files_modified: ["lib/features/authentication/presentation/pages/reset_password_page.dart", "lib/features/authentication/presentation/widgets/password_reset_form.dart"]
|
files_modified: ["lib/features/authentication/presentation/pages/reset_password_page.dart", "lib/features/authentication/presentation/widgets/password_reset_form.dart"]
|
||||||
autonomous: true
|
autonomous: true
|
||||||
user_setup:
|
user_setup:
|
||||||
|
|||||||
@@ -2,45 +2,36 @@
|
|||||||
phase: 01-authentication
|
phase: 01-authentication
|
||||||
plan: 07
|
plan: 07
|
||||||
type: execute
|
type: execute
|
||||||
wave: 4
|
wave: 3
|
||||||
depends_on: ["01-01", "01-02", "01-03", "01-04", "01-05", "01-06"]
|
depends_on: ["01-05", "01-06"]
|
||||||
files_modified: ["lib/presentation/pages/home_page.dart", "lib/main.dart", "test/integration_test/auth_flow_test.dart"]
|
files_modified: ["lib/app/router.dart", "lib/presentation/pages/home_page.dart", "lib/main.dart", "test/integration_test/auth_flow_test.dart"]
|
||||||
autonomous: false
|
autonomous: true
|
||||||
user_setup: []
|
user_setup: []
|
||||||
|
|
||||||
must_haves:
|
must_haves:
|
||||||
truths:
|
truths:
|
||||||
- "User can complete full auth flow in under 3 seconds"
|
- "Password reset navigation works seamlessly"
|
||||||
- "Session persists across app restarts"
|
- "Deep linking works on mobile and web"
|
||||||
- "User can logout from any screen"
|
|
||||||
- "All 5 success criteria are demonstrable"
|
|
||||||
- "No authentication errors in clean flow"
|
|
||||||
artifacts:
|
artifacts:
|
||||||
- path: "lib/presentation/pages/home_page.dart"
|
- path: "lib/app/router.dart"
|
||||||
provides: "Authenticated user destination"
|
provides: "Complete routing with password reset support"
|
||||||
min_lines: 25
|
min_lines: 50
|
||||||
- path: "test/integration_test/auth_flow_test.dart"
|
|
||||||
provides: "Authentication flow verification"
|
|
||||||
min_lines: 40
|
|
||||||
- path: "lib/main.dart"
|
|
||||||
provides: "Complete app initialization"
|
|
||||||
min_lines: 30
|
|
||||||
key_links:
|
key_links:
|
||||||
- from: "lib/presentation/pages/home_page.dart"
|
- from: "lib/app/router.dart"
|
||||||
to: "lib/providers/auth_provider.dart"
|
to: "reset_password_page.dart"
|
||||||
via: "logout functionality"
|
via: "route configuration"
|
||||||
pattern: "signOut|logout"
|
pattern: "/reset-password"
|
||||||
- from: "test/integration_test/auth_flow_test.dart"
|
- from: "lib/app/router.dart"
|
||||||
to: "all auth pages"
|
to: "update_password_page.dart"
|
||||||
via: "integration testing"
|
via: "deep link handling"
|
||||||
pattern: "testWidgets|integrationTest"
|
pattern: "/update-password"
|
||||||
---
|
---
|
||||||
|
|
||||||
<objective>
|
<objective>
|
||||||
Complete authentication system with logout functionality and verify all success criteria.
|
Integrate password reset navigation and deep linking.
|
||||||
|
|
||||||
Purpose: Finalize Phase 1 by adding logout capability and confirming all authentication requirements are met.
|
Purpose: Complete password reset flow with proper routing and URL handling.
|
||||||
Output: Fully functional authentication system ready for household features in Phase 2.
|
Output: Full navigation system supporting password reset on mobile and web platforms.
|
||||||
</objective>
|
</objective>
|
||||||
|
|
||||||
<execution_context>
|
<execution_context>
|
||||||
@@ -58,107 +49,56 @@ Output: Fully functional authentication system ready for household features in P
|
|||||||
<tasks>
|
<tasks>
|
||||||
|
|
||||||
<task type="auto">
|
<task type="auto">
|
||||||
<name>Create home page with logout functionality</name>
|
<name>Integrate password reset with navigation</name>
|
||||||
<files>lib/presentation/pages/home_page.dart</files>
|
<files>lib/app/router.dart</files>
|
||||||
<action>
|
<action>
|
||||||
Create HomePage that:
|
Update router to:
|
||||||
1. Shows user email and basic user info
|
1. Add /reset-password route for reset request page
|
||||||
2. Has logout button in app bar or menu
|
2. Add /update-password route for password update page
|
||||||
3. Uses AuthProvider signOut() method
|
3. Handle deep linking for password reset URLs
|
||||||
4. Shows loading state during logout
|
4. Parse reset tokens from URL parameters
|
||||||
5. Navigates to login page after successful logout
|
5. Add proper route guards and validation
|
||||||
6. Handles logout errors gracefully
|
6. Include password reset links in login/signup pages
|
||||||
7. Includes confirmation dialog for logout
|
7. Configure proper URL scheme for mobile deep linking
|
||||||
8. Has proper accessibility labels
|
8. Handle web redirect URLs properly
|
||||||
9. Responsive design for different screen sizes
|
9. Add error handling for malformed reset URLs
|
||||||
10. Placeholder content for future inventory features
|
10. Ensure navigation flow works correctly
|
||||||
11. Welcome message for authenticated user
|
|
||||||
12. Basic UI structure following Material Design
|
|
||||||
</action>
|
</action>
|
||||||
<verify>Home page displays user info, logout button works correctly, and navigation flow is smooth</verify>
|
<verify>Navigation properly handles password reset flow and deep linking</verify>
|
||||||
<done>Complete authenticated user home page with logout functionality</done>
|
<done>Complete navigation integration for password reset functionality</done>
|
||||||
</task>
|
</task>
|
||||||
|
|
||||||
<task type="auto">
|
<task type="auto">
|
||||||
<name>Finalize app integration and routing</name>
|
<name>Update pages with password reset links</name>
|
||||||
<files>lib/main.dart</files>
|
<files>lib/presentation/pages/home_page.dart, lib/main.dart</files>
|
||||||
<action>
|
<action>
|
||||||
Complete main.dart integration:
|
Update pages to include password reset navigation:
|
||||||
1. Ensure all providers are properly configured
|
1. Add "Forgot Password?" link to login page
|
||||||
2. Complete router configuration with all auth routes
|
2. Add "Forgot Password?" link to signup page
|
||||||
3. Add proper error boundaries for auth failures
|
3. Ensure deep linking works from password reset emails
|
||||||
4. Configure app theme and localization if needed
|
4. Update main app configuration for deep linking
|
||||||
5. Ensure proper initialization order:
|
5. Test navigation flows between auth pages
|
||||||
- Environment loading
|
6. Ensure proper URL scheme configuration
|
||||||
- Supabase initialization
|
7. Add navigation guards for protected routes
|
||||||
- Provider setup
|
8. Handle error states gracefully
|
||||||
- Router configuration
|
|
||||||
6. Add debugging tools in debug mode
|
|
||||||
7. Configure logging for auth operations
|
|
||||||
8. Handle deep linking for password reset
|
|
||||||
9. Ensure proper disposal of resources
|
|
||||||
10. Add performance optimizations if needed
|
|
||||||
</action>
|
</action>
|
||||||
<verify>App starts correctly, auth flow works end-to-end, and no initialization errors occur</verify>
|
<verify>Password reset links work correctly and deep linking functions on both platforms</verify>
|
||||||
<done>Complete app initialization with all authentication systems integrated</done>
|
<done>All auth pages include password reset navigation with working deep links</done>
|
||||||
</task>
|
|
||||||
|
|
||||||
<task type="auto">
|
|
||||||
<name>Create authentication flow integration tests</name>
|
|
||||||
<files>test/integration_test/auth_flow_test.dart</files>
|
|
||||||
<action>
|
|
||||||
Create comprehensive integration tests that:
|
|
||||||
1. Test signup flow with valid credentials
|
|
||||||
2. Test login flow with existing credentials
|
|
||||||
3. Test logout functionality
|
|
||||||
4. Test session persistence (simulate app restart)
|
|
||||||
5. Test password reset flow
|
|
||||||
6. Test error scenarios for each flow
|
|
||||||
7. Verify <3 second signup/login timing requirement
|
|
||||||
8. Test navigation redirects based on auth state
|
|
||||||
9. Verify all 5 success criteria programmatically
|
|
||||||
10. Include cleanup to avoid test pollution
|
|
||||||
11. Use pumpAndSettle for async operations
|
|
||||||
12. Mock network conditions if needed
|
|
||||||
</action>
|
|
||||||
<verify>Integration tests pass and verify all authentication requirements</verify>
|
|
||||||
<done>Comprehensive test suite covering all authentication flows and success criteria</done>
|
|
||||||
</task>
|
|
||||||
|
|
||||||
</tasks>
|
|
||||||
|
|
||||||
<task type="checkpoint:human-verify" gate="blocking">
|
|
||||||
<what-built>Complete authentication system with signup, login, logout, password reset, error handling, and session persistence</what-built>
|
|
||||||
<how-to-verify>
|
|
||||||
1. Run the app (`flutter run`) on device or emulator
|
|
||||||
2. Test signup flow: Create account with valid email/password - should complete in <3 seconds
|
|
||||||
3. Test login flow: Login with created credentials - should complete in <3 seconds
|
|
||||||
4. Test session persistence: Restart app - should stay logged in
|
|
||||||
5. Test password reset: Request reset email, receive email within 1 minute, update password
|
|
||||||
6. Test logout: Logout from home page - should return to login screen
|
|
||||||
7. Test error messages: Try invalid login - should see specific error (invalid password vs account not found)
|
|
||||||
8. Run integration tests: `flutter test integration_test/auth_flow_test.dart`
|
|
||||||
9. Verify all 5 success criteria from ROADMAP.md are met
|
|
||||||
</how-to-verify>
|
|
||||||
<resume-signal>Type "approved" to confirm all success criteria are met, or describe issues found</resume-signal>
|
|
||||||
</task>
|
</task>
|
||||||
|
|
||||||
</tasks>
|
</tasks>
|
||||||
|
|
||||||
<verification>
|
<verification>
|
||||||
1. All 5 success criteria from Phase 1 are demonstrable and working
|
1. Navigation flows correctly through entire password reset journey
|
||||||
2. Authentication operations complete within 3 seconds as required
|
2. Deep linking works on both mobile and web platforms
|
||||||
3. Session persists across app restarts
|
3. Route guards prevent unauthorized access to reset pages
|
||||||
4. Password reset email arrives within 1 minute
|
4. Error handling covers malformed reset URLs
|
||||||
5. Clear error messages distinguish invalid password vs account not found
|
5. Password reset links appear in login/signup pages
|
||||||
6. Logout works from any authenticated screen
|
6. URL scheme properly configured for mobile deep linking
|
||||||
7. Integration tests pass for all authentication flows
|
|
||||||
8. No unhandled exceptions or crashes in auth flows
|
|
||||||
9. Navigation properly protects routes and redirects based on auth state
|
|
||||||
</verification>
|
</verification>
|
||||||
|
|
||||||
<success_criteria>
|
<success_criteria>
|
||||||
Phase 1 Authentication & Account Basics is complete with all requirements implemented and verified. System is ready for Phase 2 household features.
|
Complete password reset navigation system with deep linking support across platforms.
|
||||||
</success_criteria>
|
</success_criteria>
|
||||||
|
|
||||||
<output>
|
<output>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ phase: 01-authentication
|
|||||||
plan: 08
|
plan: 08
|
||||||
type: execute
|
type: execute
|
||||||
wave: 3
|
wave: 3
|
||||||
depends_on: ["01-03", "01-04"]
|
depends_on: ["01-03", "01-11"]
|
||||||
files_modified: ["lib/features/authentication/presentation/pages/login_page.dart", "lib/features/authentication/presentation/pages/signup_page.dart", "lib/features/authentication/presentation/pages/reset_password_page.dart"]
|
files_modified: ["lib/features/authentication/presentation/pages/login_page.dart", "lib/features/authentication/presentation/pages/signup_page.dart", "lib/features/authentication/presentation/pages/reset_password_page.dart"]
|
||||||
autonomous: true
|
autonomous: true
|
||||||
user_setup: []
|
user_setup: []
|
||||||
|
|||||||
@@ -3,35 +3,39 @@ phase: 01-authentication
|
|||||||
plan: 10
|
plan: 10
|
||||||
type: execute
|
type: execute
|
||||||
wave: 4
|
wave: 4
|
||||||
depends_on: ["01-01", "01-02", "01-03", "01-04", "01-05", "01-06", "01-07", "01-08", "01-09"]
|
depends_on: ["01-11", "01-08", "01-09"]
|
||||||
files_modified: ["lib/presentation/pages/home_page.dart", "lib/main.dart", "test/integration_test/auth_flow_test.dart"]
|
files_modified: ["lib/features/authentication/presentation/pages/home_page.dart", "lib/providers/auth_provider.dart", "test/integration_test/auth_flow_test.dart"]
|
||||||
autonomous: false
|
autonomous: false
|
||||||
user_setup: []
|
user_setup: []
|
||||||
|
|
||||||
must_haves:
|
must_haves:
|
||||||
truths:
|
truths:
|
||||||
- "Password reset navigation works seamlessly"
|
- "User can log out from any screen"
|
||||||
- "Deep linking works on mobile and web"
|
- "Logout clears session and requires re-authentication"
|
||||||
|
- "All auth success criteria are verified"
|
||||||
artifacts:
|
artifacts:
|
||||||
- path: "lib/app/router.dart"
|
- path: "lib/features/authentication/presentation/pages/home_page.dart"
|
||||||
provides: "Complete routing with password reset support"
|
provides: "Home page with logout functionality"
|
||||||
min_lines: 50
|
min_lines: 30
|
||||||
|
- path: "lib/providers/auth_provider.dart"
|
||||||
|
provides: "Enhanced auth provider with logout"
|
||||||
|
min_lines: 40
|
||||||
key_links:
|
key_links:
|
||||||
- from: "lib/app/router.dart"
|
- from: "lib/features/authentication/presentation/pages/home_page.dart"
|
||||||
to: "reset_password_page.dart"
|
to: "lib/providers/auth_provider.dart"
|
||||||
via: "route configuration"
|
via: "logout method call"
|
||||||
pattern: "/reset-password"
|
pattern: "signOut|logout"
|
||||||
- from: "lib/app/router.dart"
|
- from: "lib/providers/auth_provider.dart"
|
||||||
to: "update_password_page.dart"
|
to: "supabase.auth"
|
||||||
via: "deep link handling"
|
via: "session clearing"
|
||||||
pattern: "/update-password"
|
pattern: "supabase\\.auth\\.signOut"
|
||||||
---
|
---
|
||||||
|
|
||||||
<objective>
|
<objective>
|
||||||
Integrate password reset navigation and deep linking.
|
Implement logout functionality and verify all authentication success criteria.
|
||||||
|
|
||||||
Purpose: Complete password reset flow with proper routing and URL handling.
|
Purpose: Complete authentication system with logout capability and validate all requirements are met.
|
||||||
Output: Full navigation system supporting password reset on mobile and web platforms.
|
Output: Working logout functionality and verified authentication system meeting all success criteria.
|
||||||
</objective>
|
</objective>
|
||||||
|
|
||||||
<execution_context>
|
<execution_context>
|
||||||
@@ -49,38 +53,69 @@ Output: Full navigation system supporting password reset on mobile and web platf
|
|||||||
<tasks>
|
<tasks>
|
||||||
|
|
||||||
<task type="auto">
|
<task type="auto">
|
||||||
<name>Integrate password reset with navigation</name>
|
<name>Add logout functionality to auth provider</name>
|
||||||
<files>lib/app/router.dart</files>
|
<files>lib/providers/auth_provider.dart</files>
|
||||||
<action>
|
<action>
|
||||||
Update router to:
|
Update AuthProvider to:
|
||||||
1. Add /reset-password route for reset request page
|
1. Implement signOut() method that calls repository.signOut()
|
||||||
2. Add /update-password route for password update page
|
2. Clear all user state on logout
|
||||||
3. Handle deep linking for password reset URLs
|
3. Handle loading state during logout
|
||||||
4. Parse reset tokens from URL parameters
|
4. Handle any logout errors gracefully
|
||||||
5. Add proper route guards and validation
|
5. Ensure proper cleanup of resources
|
||||||
6. Include password reset links in login/signup pages
|
6. Update auth state to null after successful logout
|
||||||
7. Configure proper URL scheme for mobile deep linking
|
7. Dispose of any stream subscriptions
|
||||||
8. Handle web redirect URLs properly
|
8. Navigate to login screen after logout
|
||||||
9. Add error handling for malformed reset URLs
|
|
||||||
10. Ensure navigation flow works correctly
|
|
||||||
</action>
|
</action>
|
||||||
<verify>Navigation properly handles password reset flow and deep linking</verify>
|
<verify>AuthProvider successfully logs out user and clears all session data</verify>
|
||||||
<done>Complete navigation integration for password reset functionality</done>
|
<done>Complete logout functionality in auth state management</done>
|
||||||
|
</task>
|
||||||
|
|
||||||
|
<task type="auto">
|
||||||
|
<name>Add logout button to home page</name>
|
||||||
|
<files>lib/features/authentication/presentation/pages/home_page.dart</files>
|
||||||
|
<action>
|
||||||
|
Update HomePage to:
|
||||||
|
1. Add logout button in app bar or menu
|
||||||
|
2. Connect logout button to AuthProvider.signOut()
|
||||||
|
3. Show confirmation dialog before logout
|
||||||
|
4. Handle logout loading state
|
||||||
|
5. Provide clear logout feedback
|
||||||
|
6. Ensure logout works from any screen
|
||||||
|
7. Add proper accessibility labels
|
||||||
|
8. Style logout button appropriately
|
||||||
|
</action>
|
||||||
|
<verify>Logout button works correctly and logs user out from home page</verify>
|
||||||
|
<done>Home page with working logout functionality</done>
|
||||||
|
</task>
|
||||||
|
|
||||||
|
<task type="checkpoint:human-verify" gate="blocking">
|
||||||
|
<what-built>Complete authentication system with logout functionality</what-built>
|
||||||
|
<how-to-verify>
|
||||||
|
1. Test signup flow: create new account in <3 seconds
|
||||||
|
2. Test login flow: log in with valid credentials
|
||||||
|
3. Test session persistence: restart app and verify still logged in
|
||||||
|
4. Test password reset: request reset, receive email within 1 minute
|
||||||
|
5. Test logout: tap logout button, verify session cleared
|
||||||
|
6. Test re-authentication: try accessing protected page after logout
|
||||||
|
7. Test error messages: invalid password vs account not found
|
||||||
|
</how-to-verify>
|
||||||
|
<resume-signal>Type "approved" if all success criteria are met, or describe issues</resume-signal>
|
||||||
</task>
|
</task>
|
||||||
|
|
||||||
</tasks>
|
</tasks>
|
||||||
|
|
||||||
<verification>
|
<verification>
|
||||||
1. Navigation flows correctly through entire password reset journey
|
1. User can sign up with email and password in <3 seconds
|
||||||
2. Deep linking works on both mobile and web platforms
|
2. User can log in with valid credentials and session persists across app restarts
|
||||||
3. Route guards prevent unauthorized access to reset pages
|
3. User can reset forgotten password and receive recovery email within 1 minute
|
||||||
4. Error handling covers malformed reset URLs
|
4. User can log out from any screen and subsequent session requires re-authentication
|
||||||
5. Password reset links appear in login/signup pages
|
5. Failed login attempts return clear error messages (invalid password vs account not found)
|
||||||
6. URL scheme properly configured for mobile deep linking
|
6. Logout button is accessible and works correctly from home page
|
||||||
|
7. All authentication flows work end-to-end without errors
|
||||||
</verification>
|
</verification>
|
||||||
|
|
||||||
<success_criteria>
|
<success_criteria>
|
||||||
Complete password reset navigation system with deep linking support across platforms.
|
Complete authentication system meeting all Phase 1 success criteria with working logout functionality.
|
||||||
</success_criteria>
|
</success_criteria>
|
||||||
|
|
||||||
<output>
|
<output>
|
||||||
|
|||||||
118
.planning/phases/01-authentication/01-11-PLAN.md
Normal file
118
.planning/phases/01-authentication/01-11-PLAN.md
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
---
|
||||||
|
phase: 01-authentication
|
||||||
|
plan: 11
|
||||||
|
type: execute
|
||||||
|
wave: 2
|
||||||
|
depends_on: ["01-04"]
|
||||||
|
files_modified: ["lib/app/router.dart", "lib/presentation/pages/splash_page.dart", "lib/main.dart"]
|
||||||
|
autonomous: true
|
||||||
|
user_setup: []
|
||||||
|
|
||||||
|
must_haves:
|
||||||
|
truths:
|
||||||
|
- "Navigation works based on authentication status"
|
||||||
|
- "App starts with splash screen and navigates appropriately"
|
||||||
|
- "Protected routes redirect to login when not authenticated"
|
||||||
|
artifacts:
|
||||||
|
- path: "lib/app/router.dart"
|
||||||
|
provides: "Auth-based navigation"
|
||||||
|
min_lines: 40
|
||||||
|
- path: "lib/presentation/pages/splash_page.dart"
|
||||||
|
provides: "Initial loading screen"
|
||||||
|
min_lines: 20
|
||||||
|
key_links:
|
||||||
|
- from: "lib/providers/auth_provider.dart"
|
||||||
|
to: "lib/app/router.dart"
|
||||||
|
via: "auth state listening"
|
||||||
|
pattern: "onAuthStateChange|authStateChanges"
|
||||||
|
- from: "lib/app/router.dart"
|
||||||
|
to: "lib/presentation/pages/splash_page.dart"
|
||||||
|
via: "initial navigation"
|
||||||
|
pattern: "splash|initial"
|
||||||
|
---
|
||||||
|
|
||||||
|
<objective>
|
||||||
|
Implement auth-aware navigation system and app integration.
|
||||||
|
|
||||||
|
Purpose: Create navigation system that protects routes and responds to authentication changes.
|
||||||
|
Output: Complete navigation system with protected routes and proper app initialization.
|
||||||
|
</objective>
|
||||||
|
|
||||||
|
<execution_context>
|
||||||
|
@~/.opencode/get-shit-done/workflows/execute-plan.md
|
||||||
|
@~/.opencode/get-shit-done/templates/summary.md
|
||||||
|
</execution_context>
|
||||||
|
|
||||||
|
<context>
|
||||||
|
@.planning/PROJECT.md
|
||||||
|
@.planning/ROADMAP.md
|
||||||
|
@.planning/STATE.md
|
||||||
|
@.planning/phases/01-authentication/01-RESEARCH.md
|
||||||
|
</context>
|
||||||
|
|
||||||
|
<tasks>
|
||||||
|
|
||||||
|
<task type="auto">
|
||||||
|
<name>Create auth-aware navigation system</name>
|
||||||
|
<files>lib/app/router.dart, lib/presentation/pages/splash_page.dart</files>
|
||||||
|
<action>
|
||||||
|
Create navigation system with:
|
||||||
|
|
||||||
|
1. SplashPage that:
|
||||||
|
- Shows while checking initial auth state
|
||||||
|
- Navigates to login or home after auth check
|
||||||
|
- Has proper loading indicator
|
||||||
|
- Handles app startup sequence
|
||||||
|
|
||||||
|
2. Router configuration that:
|
||||||
|
- Uses GoRouter for declarative routing
|
||||||
|
- Has protected routes (redirect to login if not authenticated)
|
||||||
|
- Has public routes (login, signup, password reset)
|
||||||
|
- Listens to AuthProvider for auth state changes
|
||||||
|
- Includes proper route definitions:
|
||||||
|
- / → redirect based on auth state
|
||||||
|
- /login → login page
|
||||||
|
- /signup → signup page
|
||||||
|
- /home → protected home route (placeholder)
|
||||||
|
- Handles deep linking properly
|
||||||
|
- Includes proper error handling for navigation
|
||||||
|
</action>
|
||||||
|
<verify>Navigation correctly redirects based on authentication status and all routes are accessible</verify>
|
||||||
|
<done>Complete navigation system that protects routes and responds to authentication changes</done>
|
||||||
|
</task>
|
||||||
|
|
||||||
|
<task type="auto">
|
||||||
|
<name>Integrate auth system with main app</name>
|
||||||
|
<files>lib/main.dart</files>
|
||||||
|
<action>
|
||||||
|
Update main.dart to:
|
||||||
|
1. Wrap MyApp with appropriate providers (Riverpod/ChangeNotifierProvider)
|
||||||
|
2. Initialize AuthProvider with AuthRepositoryImpl
|
||||||
|
3. Configure router with auth state integration
|
||||||
|
4. Set up proper error boundaries
|
||||||
|
5. Ensure proper initialization order
|
||||||
|
6. Add proper app structure with MaterialApp.router
|
||||||
|
7. Configure theme and other app-level settings
|
||||||
|
8. Ensure proper disposal of resources
|
||||||
|
</action>
|
||||||
|
<verify>App starts with splash screen, properly checks auth state, and navigates to appropriate initial screen</verify>
|
||||||
|
<done>Complete app integration with authentication system</done>
|
||||||
|
</task>
|
||||||
|
|
||||||
|
</tasks>
|
||||||
|
|
||||||
|
<verification>
|
||||||
|
1. Navigation system properly protects routes and redirects based on auth status
|
||||||
|
2. App starts with splash screen and navigates to appropriate screen
|
||||||
|
3. Deep linking works correctly
|
||||||
|
4. Error handling covers navigation failures
|
||||||
|
5. Auth state changes trigger appropriate navigation updates
|
||||||
|
</verification>
|
||||||
|
|
||||||
|
<success_criteria>
|
||||||
|
Complete navigation system with protected routes and proper app integration.
|
||||||
|
</success_criteria>
|
||||||
|
|
||||||
|
<output>
|
||||||
|
After completion, create `.planning/phases/01-authentication/01-11-SUMMARY.md`
|
||||||
|
</output>
|
||||||
Reference in New Issue
Block a user