Skip to content

fix(mobile): app lock covers every route, not just home - #129

Merged
thangnm93 merged 1 commit into
developfrom
fix/app-lock-every-route
Nov 13, 2026
Merged

thangnm93 merged 1 commit into
developfrom
fix/app-lock-every-route

Conversation

@thangnm93

Copy link
Copy Markdown
Collaborator

Security fix (Android): the app lock now covers every screen, not only the home screen.

AppLockGate was MaterialApp.home, so any pushed route stayed above the lock screen when the app locked, at cold start or after backgrounding. That includes a terminal, an SFTP browser and dialogs, and it was also what the app-switcher snapshot showed.

  • Fix: the gate now wraps the navigator in MaterialApp.builder, outside ysRootBuilderTouch so that toasts can't paint over the lock.
  • While locked: the navigator stays mounted but offstage with tickers off. Routes and sessions survive the unlock.
  • Unchanged: the lifecycle rules (lock on inactive, hidden or paused; re-authenticate on resume; no prompt loop; fall open when no biometrics are enrolled).
  • Tests: a pushed route, re-locking after backgrounding, a root-navigator dialog and a toast are each covered while locked. They failed before the change.
  • Results: app suite 2798 passed, 16 skipped. Analyzer is clean and the UI lint passes.

The app-switcher protection still depends on the lock painting before Android takes the snapshot. FLAG_SECURE would make it strict but would also block all screenshots, so it is left as a separate decision.

https://claude.ai/code/session_01YGAGXFNiYwvqiuiRKg25y2

@thangnm93
thangnm93 merged commit b188785 into develop Nov 13, 2026
11 checks passed
@thangnm93 thangnm93 mentioned this pull request Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant