Resume Session in Correct Organizational Context After App Restart
Returning users should not be required to re-select their organization every session. The tenant-session-store (674-tenant-session-store) persists the selected organization identifier securely using the secure-storage-adapter (676-secure-storage-adapter / 030-secure-storage-adapter). On app launch, after authentication (biometric or credential-based), the org-route-guard (671-org-route-guard) checks for a persisted org context and, if valid and the user's membership is still active, bypasses the org selection screen and navigates directly to the role-based home screen. If the persisted organization is no longer valid (membership revoked, org disabled), the guard redirects to the org selection screen with an appropriate explanation.
User Story
Acceptance Criteria
- Given I previously selected an organization and closed the app, When I reopen the app and authenticate with biometrics, Then I am taken directly to the home screen of my previously selected organization without seeing the org selection screen
- Given I have a persisted organization selection, When the app launches and my membership in that organization has been revoked, Then I am redirected to the org selection screen with a message explaining that my access to the previous organization has changed
- Given I have a persisted organization selection, When the app launches offline, Then the app uses the locally cached org context to load available offline data, displaying a banner indicating that data may be stale
- Given I have selected a new organization via the in-session switcher, When I close and reopen the app, Then the app resumes in the most recently selected organization
- Given the persisted org context is stored, When I examine app storage on the device, Then the organization identifier is stored in the secure storage partition and not in plaintext shared preferences
Business Value
HLF reported a peer mentor with 380 individual activity registrations in a single year. For high-frequency users like this, requiring organization re-selection on every app open would create significant daily friction that accumulates into meaningful time waste and frustration. Session resumption with the correct organizational context is a baseline usability requirement that directly supports the workshop's stated goal of keeping cognitive load and number of clicks as low as possible for every registration session. It also ensures data security by storing the org identifier in secure storage rather than plaintext.
Components
- Organization Persistence Repository data
- Local Storage Adapter infrastructure
- Secure Storage Adapter infrastructure
- Session Resume Manager service
- Secure Session Storage data
- Organization Route Guard service
- Organization Repository data
- Tenant Session Store data
- Organization Branding Cache data
- Secure Storage Adapter infrastructure