feat(mobile-oidc): Story 3.1 AppLifecycle Token Validation
Summary
- Add
WidgetsBindingObservertoAuthNotifierfor app lifecycle token validation - When app resumes from background, silently validate tokens and refresh if expired
- Guard against non-authenticated state to avoid spurious refresh attempts
- Code review fixes:
ref.mountedguard in lifecycle callback, accurate log message for null expiration
Test plan
-
32/32 unit tests pass ( flutter test) -
11 new tests covering all 7 ACs (resume trigger, valid token, expired+refresh, both expired, observer add/remove, non-auth no-op, idempotence) -
Zero new lint issues ( flutter analyze) -
Manual verification: background app >5min, resume → session validated or login screen shown