Skip to content

feat(mobile): protect identity access with device authentication - #5116

Open
tellaho wants to merge 8 commits into
mainfrom
tho/mobile-biometric-export
Open

feat(mobile): protect identity access with device authentication#5116
tellaho wants to merge 8 commits into
mainfrom
tho/mobile-biometric-export

Conversation

@tellaho

@tellaho tellaho commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Category: new-feature
User Impact: Mobile users can protect identity access with Face ID, biometrics, or their device passcode.

Problem: A signed-in phone could open a protected identity or send it to another device without fresh local verification.

Solution: Add a per-community protection policy backed by OS device authentication, enforce it at app entry and before identity transfer, and offer it during pairing and in Mobile security settings.

Screen.Recording.2026-08-06.at.3-13-49.PM.mp4
File changes

mobile/android/app/src/main/kotlin/xyz/block/buzz/mobile/MainActivity.kt
Use the Android activity type required by the system biometric prompt and disable Recents snapshots on Android 13+ without blocking normal screenshots or recording.

mobile/ios/Podfile.lock
Record the iOS native dependencies added by local authentication.

mobile/ios/Runner/Info.plist
Explain why Buzz requests Face ID access.

mobile/lib/app.dart
Lock protected communities at app entry and resume without exposing authenticated content first.

mobile/lib/features/pairing/pairing_page.dart
Offer clear, platform-specific protection controls while importing an identity.

mobile/lib/features/pairing/pairing_provider.dart
Authorize protected identity imports and exports before identity material is transferred, and persist the enrollment choice.

mobile/lib/features/settings/settings_page.dart
Add the Mobile security section to settings.

mobile/lib/features/settings/settings_page/connection_section.dart
Authorize identity export before opening recovery.

mobile/lib/features/settings/settings_page/mobile_security_section.dart
Let users enable or disable protection for the active community and report device-authentication availability.

mobile/lib/shared/auth/auth_provider.dart
Persist protection-policy changes for the active community.

mobile/lib/shared/community/community.dart
Store a per-community protection policy with a safe legacy default.

mobile/lib/shared/security/sensitive_action_authorizer.dart
Centralize OS authentication and map platform errors to stable app-level outcomes.

mobile/pubspec.lock
Lock the Flutter local-authentication dependency graph.

mobile/pubspec.yaml
Add local_auth for system biometric and device-credential prompts.

mobile/test/features/pairing/pairing_page_test.dart
Cover enrollment controls and platform-specific protection copy.

mobile/test/features/pairing/pairing_provider_test.dart
Cover protected import and export authorization, cancellation, and payload ordering.

mobile/test/features/settings/theme_picker_page_test.dart
Cover the settings behavior exercised by the protection controls.

mobile/test/shared/community/community_test.dart
Cover protection-policy serialization and legacy migration.

mobile/test/shared/security/app_lock_gate_test.dart
Cover protected startup, cancellation, retry, and unprotected entry.

Reproduction steps

  1. Pair an identity into the mobile app and leave identity protection enabled during confirmation.
  2. Relaunch the app and verify Face ID, biometrics, or the device passcode is required before community content appears.
  3. Open Settings → Mobile security and disable protection; relaunch and verify the app opens without a prompt.
  4. Re-enable protection, choose “Send identity to desktop,” and verify authentication happens before the transfer flow opens.
  5. Cancel device authentication and verify no identity transfer begins.

Validation

  • cd mobile && flutter test — 1,268 tests passed at 7129cfe48c3064005c7985c3b283f864b3a00063
  • cd mobile && flutter analyze — no issues at 7129cfe48c3064005c7985c3b283f864b3a00063
  • cd mobile && flutter build apk --debug — succeeded at 7129cfe48c3064005c7985c3b283f864b3a00063
  • Pre-push mobile-test passed

tellaho added 8 commits August 6, 2026 14:56
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
@tellaho
tellaho marked this pull request as ready for review August 6, 2026 23:28
@tellaho
tellaho requested a review from a team as a code owner August 6, 2026 23:28
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