MEDIUM story-email-password-login-organization-administrator-006 1 pts
1
Story Points
Medium
Priority
Email & Password Login
Feature

User Story

As a user
I want to log out of the app and have my session fully terminated
So that So that my account is protected when I hand my device to another person or when I am finished with my session

Acceptance Criteria

  • Given an authenticated user in the settings screen, when they tap Log Out, then a confirmation dialog or direct logout action clears the session and navigates to the login screen
  • Given logout is confirmed, when the Auth Service processes the request, then the Supabase session is revoked server-side and all local tokens are removed from Flutter Secure Storage
  • Given a successful logout, when the user presses the back button or navigates to any protected route, then they are redirected to the login screen
  • Given a network failure during logout, when the Supabase revocation call fails, then local tokens are still cleared and the user is navigated to the login screen with an informational message
  • Given a logged-out state, when the app is reopened, then no session is detected and the login screen is shown

Business Value

Secure logout is a fundamental security control required when handling sensitive health and personal data about vulnerable individuals. The app processes sensitive assignment data, contact information, and personal health details — ensuring sessions are fully terminated protects both users and the individuals they serve. Proper logout also satisfies baseline GDPR data protection expectations and prevents unauthorized access on shared or lost devices.

Components