feat(mobile): protect identity access with device authentication - #5116
Open
tellaho wants to merge 8 commits into
Open
feat(mobile): protect identity access with device authentication#5116tellaho wants to merge 8 commits into
tellaho wants to merge 8 commits into
Conversation
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
marked this pull request as ready for review
August 6, 2026 23:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_authfor 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
Validation
cd mobile && flutter test— 1,268 tests passed at7129cfe48c3064005c7985c3b283f864b3a00063cd mobile && flutter analyze— no issues at7129cfe48c3064005c7985c3b283f864b3a00063cd mobile && flutter build apk --debug— succeeded at7129cfe48c3064005c7985c3b283f864b3a00063mobile-testpassed