Skip to content

armgit / ente

Public Imported from GitHub
0

💚 End-to-end encrypted cloud for everything.

Add SAF-backed backup selection and raise retention

Prateek Sunale8633bb796b1
diff --git a/mobile/apps/auth/lib/services/local_backup_service.dart b/mobile/apps/auth/lib/services/local_backup_service.dart
index ab496fe172..f48c5f7147 100644
--- a/mobile/apps/auth/lib/services/local_backup_service.dart
+++ b/mobile/apps/auth/lib/services/local_backup_service.dart
@@ -1,11 +1,14 @@
import 'dart:convert';
import 'dart:io';
+import 'dart:typed_data';
+
import 'package:ente_auth/models/export/ente.dart';
import 'package:ente_auth/store/code_store.dart';
import 'package:ente_crypto_dart/ente_crypto_dart.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
-import 'package:intl/intl.dart'; //for time based file naming
+import 'package:intl/intl.dart'; // for time based file naming
import 'package:logging/logging.dart';
+import 'package:saf_stream/saf_stream.dart';
import 'package:shared_preferences/shared_preferences.dart';
//we gonn change
@@ -15,7 +18,7 @@ class LocalBackupService {
LocalBackupService._privateConstructor();
LocalBackupService._privateConstructor();
- static const int _maxBackups = 2;
+ static const int _maxBackups = 5;
// to create an encrypted backup file if the toggle is on
Future<void> triggerAutomaticBackup() async {
@@ -28,9 +31,16 @@ class LocalBackupService {
}
final backupPath = prefs.getString('autoBackupPath');
- if (backupPath == null) {
+ final backupTreeUri = prefs.getString('autoBackupTreeUri');
+ if (backupPath == null && (backupTreeUri == null || backupTreeUri.isEmpty)) {
return;
}
+
+ Directory? backupDirectory;
+ if (backupPath != null && backupPath.isNotEmpty) {
+ backupDirectory = Directory(backupPath);
+ await backupDirectory.create(recursive: true);
+ }
const storage = FlutterSecureStorage();
final password = await storage.read(key: 'autoBackupPassword');
@@ -100,18 +110,48 @@ class LocalBackupService {
final formattedDate = formatter.format(now);
final fileName = 'ente-auth-auto-backup-$formattedDate.json';
- final filePath = '$backupPath/$fileName';
- final backupFile = File(filePath);
-
- await backupFile.writeAsString(encryptedJson);
- await _manageOldBackups(backupPath);
-
- _logger.info('Automatic encrypted backup successful! Saved to: $filePath');
+ if (backupTreeUri != null && backupTreeUri.isNotEmpty) {
+ await _writeBackupWithSaf(
+ backupTreeUri,
+ fileName,
+ encryptedJson,
+ );
+ } else if (backupDirectory != null) {
+ final filePath = '${backupDirectory.path}/$fileName';
+ final backupFile = File(filePath);
+ await backupFile.create(recursive: true);
+ await backupFile.writeAsString(encryptedJson);
+ await _manageOldBackups(backupDirectory.path);
+ _logger.info(
+ 'Automatic encrypted backup successful! Saved to: $filePath',
+ );
+ }
} catch (e, s) {
_logger.severe('Silent error during automatic backup', e, s);
}
}
+ Future<void> _writeBackupWithSaf(
+ String treeUri,
+ String fileName,
+ String content,
+ ) async {
+ try {
+ final safStream = SafStream();
+ await safStream.writeFileBytes(
+ treeUri,
+ fileName,
+ 'application/json',
+ Uint8List.fromList(utf8.encode(content)),
+ overwrite: true,
+ );
+ _logger.info('Automatic encrypted backup saved via SAF: $fileName');
+ } catch (e, s) {
+ _logger.severe('Failed to write backup via SAF', e, s);
+ rethrow;
+ }
+ }
+
Future<void> _manageOldBackups(String backupPath) async {
try {
_logger.info("Checking for old backups to clean up...");
@@ -174,4 +214,4 @@ _logger.info('Backup count is now ${files.length}. Cleanup complete.');
_logger.severe('Error during full backup cleanup of old directory', e, s);
}
}
-}
\ No newline at end of file
+}
diff --git a/mobile/apps/auth/lib/ui/settings/data/local_backup/local_backup_experience.dart b/mobile/apps/auth/lib/ui/settings/data/local_backup/local_backup_experience.dart
index 221e7ad82c..f714b34617 100644
--- a/mobile/apps/auth/lib/ui/settings/data/local_backup/local_backup_experience.dart
+++ b/mobile/apps/auth/lib/ui/settings/data/local_backup/local_backup_experience.dart
@@ -5,13 +5,13 @@ import 'package:ente_auth/services/local_backup_service.dart';
import 'package:ente_auth/theme/ente_theme.dart';
import 'package:ente_auth/ui/components/buttons/button_widget.dart';
import 'package:ente_auth/ui/components/dialog_widget.dart';
-import 'package:ente_auth/ui/components/models/button_result.dart';
import 'package:ente_auth/ui/components/models/button_type.dart';
import 'package:ente_lock_screen/local_authentication_service.dart';
import 'package:file_picker/file_picker.dart';
import 'package:flutter/material.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:path_provider/path_provider.dart';
+import 'package:saf_util/saf_util.dart';
import 'package:shared_preferences/shared_preferences.dart';
const _passwordDialogHint = 'Your backup will be encrypted with this password.';
@@ -40,6 +40,7 @@ class LocalBackupExperienceController {
bool get shouldShowBusyOverlay => _state._shouldShowBusyOverlay;
bool get isBackupEnabled => _state._isBackupEnabled;
String? get backupPath => _state._backupPath;
+ String? get backupTreeUri => _state._backupTreeUri;
Future<void> toggleBackup(bool shouldEnable) =>
_state._handleToggle(shouldEnable);
@@ -49,6 +50,8 @@ class LocalBackupExperienceController {
Future<bool> openLocationSetup() => _state._handleLocationSetup();
+ Future<bool> resetBackupLocation() => _state._resetBackupLocation();
+
Future<void> runManualBackup({bool showSnackBar = true}) =>
_state._runManualBackup(showSnackBar: showSnackBar);
@@ -57,8 +60,6 @@ class LocalBackupExperienceController {
Future<bool> hasPasswordConfigured() => _state._hasStoredPassword();
- Future<String> resolveDefaultPath() => _state._getDefaultBackupPath();
-
String simplifyPath(String fullPath) => _state._simplifyPath(fullPath);
void showSnackBar(String message) => _state._showSnackBar(message);
@@ -69,14 +70,14 @@ class LocalBackupExperienceController {
class _LocalBackupExperienceState extends State<LocalBackupExperience> {
static const _passwordKey = 'autoBackupPassword';
static const _locationConfiguredKey = 'hasConfiguredBackupLocation';
+ static const _treeUriKey = 'autoBackupTreeUri';
bool _isBackupEnabled = false;
String? _backupPath;
- bool _hasConfiguredLocation = false;
+ String? _backupTreeUri;
bool _isBusy = false;
bool _shouldShowBusyOverlay = true;
bool _hasLoaded = false;
- Future<String>? _defaultPathFuture;
late final LocalBackupExperienceController _controller;
@@ -95,13 +96,12 @@ class _LocalBackupExperienceState extends State<LocalBackupExperience> {
Future<void> _loadSettings() async {
final prefs = await SharedPreferences.getInstance();
final storedPath = prefs.getString('autoBackupPath');
- final locationConfigured =
- prefs.getBool(_locationConfiguredKey) ?? storedPath != null;
+ final storedTreeUri = prefs.getString(_treeUriKey);
if (!mounted) return;
setState(() {
_isBackupEnabled = prefs.getBool('isAutoBackupEnabled') ?? false;
_backupPath = storedPath;
- _hasConfiguredLocation = locationConfigured;
+ _backupTreeUri = storedTreeUri;
_hasLoaded = true;
});
}
@@ -140,11 +140,15 @@ class _LocalBackupExperienceState extends State<LocalBackupExperience> {
return false;
}
- bool locationReady = _hasConfiguredLocation;
- if (!locationReady) {
- locationReady = await _handleLocationSetup();
+ final selected = await _handleLocationSetup();
+ if (!selected) {
+ _showSnackBar('Select a folder to continue');
+ return false;
}
- if (!locationReady) {
+ if (Platform.isAndroid &&
+ (_backupTreeUri == null || _backupTreeUri!.isEmpty) &&
+ (_backupPath == null || _backupPath!.isEmpty)) {
+ _showSnackBar(context.l10n.noDefaultBackupFolder);
return false;
}
@@ -161,6 +165,40 @@ class _LocalBackupExperienceState extends State<LocalBackupExperience> {
Future<void> _runManualBackup({bool showSnackBar = true}) async {
await _withBusyGuard(() async {
+ var hasPassword = await _hasStoredPassword();
+ if (!hasPassword) {
+ hasPassword = await _promptPassword(
+ forcePrompt: true,
+ disableOnCancel: false,
+ isUpdateFlow: false,
+ );
+ }
+ if (!hasPassword) {
+ return;
+ }
+
+ if (Platform.isAndroid) {
+ if ((_backupTreeUri == null || _backupTreeUri!.isEmpty) &&
+ (_backupPath == null || _backupPath!.isEmpty)) {
+ final saved = await _pickAndSaveBackupLocation();
+ if (!saved) {
+ return;
+ }
+ }
+ } else {
+ var resolvedPath = _backupPath;
+ if (resolvedPath == null || resolvedPath.isEmpty) {
+ final saved = await _pickAndSaveBackupLocation();
+ if (!saved) {
+ return;
+ }
+ resolvedPath = _backupPath;
+ }
+ if (resolvedPath != null && resolvedPath.isNotEmpty) {
+ await Directory(resolvedPath).create(recursive: true);
+ }
+ }
+
await LocalBackupService.instance.triggerAutomaticBackup();
if (showSnackBar) {
_showSnackBar(context.l10n.initialBackupCreated);
@@ -253,6 +291,22 @@ class _LocalBackupExperienceState extends State<LocalBackupExperience> {
}
}
+ Future<bool> _resetBackupLocation() async {
+ if (_isBackupEnabled) {
+ return false;
+ }
+ final prefs = await SharedPreferences.getInstance();
+ await prefs.remove('autoBackupPath');
+ await prefs.remove(_treeUriKey);
+ await prefs.remove(_locationConfiguredKey);
+ if (!mounted) return false;
+ setState(() {
+ _backupPath = null;
+ _backupTreeUri = null;
+ });
+ return true;
+ }
+
Future<String?> _showCustomPasswordDialog({
required bool isUpdateFlow,
}) async {
@@ -363,78 +417,72 @@ class _LocalBackupExperienceState extends State<LocalBackupExperience> {
);
}
- Future<ButtonResult?> _showLocationChoiceDialog({
- required String displayPath,
- }) async {
- final l10n = context.l10n;
-
- final dialogBody =
- '${l10n.backupLocationChoiceDescription}\n\nCurrent backup folder:\n${_simplifyPath(displayPath)}';
-
- final result = await showDialogWidget(
- title: l10n.chooseBackupLocation,
- context: context,
- body: dialogBody,
- buttons: [
- ButtonWidget(
- buttonType: ButtonType.primary,
- labelText: l10n.changeLocation,
- isInAlert: true,
- buttonSize: ButtonSize.large,
- buttonAction: ButtonAction.second,
- ),
- ButtonWidget(
- buttonType: ButtonType.secondary,
- labelText: l10n.continueLabel,
- isInAlert: true,
- buttonSize: ButtonSize.large,
- buttonAction: ButtonAction.first,
- ),
- ],
- );
-
- return result;
- }
-
Future<bool> _handleLocationSetup() async {
- String currentPath = _backupPath ?? await _getDefaultBackupPath();
-
- while (true) {
- final result = await _showLocationChoiceDialog(displayPath: currentPath);
+ if (Platform.isAndroid) {
+ return _pickAndPersistAndroidLocation();
+ }
- if (result?.action == ButtonAction.first) {
- return _persistLocation(
- currentPath,
- successMessage: context.l10n.initialBackupCreated,
+ if (Platform.isIOS) {
+ final l10n = context.l10n;
+ final dialogBody = StringBuffer()
+ ..writeln(l10n.backupLocationChoiceDescription)
+ ..writeln()
+ ..writeln(
+ 'To enable backups on iOS, choose a folder in Files (for example “On My iPhone”).',
+ )
+ ..writeln()
+ ..writeAll(
+ _backupPath != null && _backupPath!.isNotEmpty
+ ? [
+ 'Current backup folder:',
+ _simplifyPath(_backupPath!),
+ ]
+ : const [],
+ '\n',
);
- } else if (result?.action == ButtonAction.second) {
- final newPath = await FilePicker.platform.getDirectoryPath();
- if (newPath != null) {
- currentPath = newPath;
- }
- } else {
- return false;
- }
- }
- }
- Future<String> _getDefaultBackupPath() {
- _defaultPathFuture ??= _computeDefaultBackupPath();
- return _defaultPathFuture!;
- }
+ final result = await showDialogWidget(
+ title: l10n.chooseBackupLocation,
+ context: context,
+ body: dialogBody.toString(),
+ buttons: const [
+ ButtonWidget(
+ buttonType: ButtonType.primary,
+ labelText: 'Select folder',
+ isInAlert: true,
+ buttonSize: ButtonSize.large,
+ buttonAction: ButtonAction.second,
+ ),
+ ButtonWidget(
+ buttonType: ButtonType.secondary,
+ labelText: 'Cancel',
+ isInAlert: true,
+ buttonSize: ButtonSize.large,
+ buttonAction: ButtonAction.first,
+ ),
+ ],
+ );
- Future<String> _computeDefaultBackupPath() async {
- if (Platform.isAndroid) {
- Directory? externalDir = await getExternalStorageDirectory();
- if (externalDir != null) {
- String storagePath = externalDir.path.split('/Android')[0];
- return '$storagePath/Download/EnteAuthBackups';
+ if (result?.action == ButtonAction.second) {
+ final pickedPath = await FilePicker.platform.getDirectoryPath();
+ if (pickedPath != null) {
+ return _persistLocation(
+ pickedPath,
+ successMessage: context.l10n.initialBackupCreated,
+ );
+ }
}
+ return false;
}
- Directory? dir = await getDownloadsDirectory();
- dir ??= await getApplicationDocumentsDirectory();
- return '${dir.path}/EnteAuthBackups';
+ final pickedPath = await FilePicker.platform.getDirectoryPath();
+ if (pickedPath != null) {
+ return _persistLocation(
+ pickedPath,
+ successMessage: context.l10n.initialBackupCreated,
+ );
+ }
+ return false;
}
String _simplifyPath(String fullPath) {
@@ -443,6 +491,11 @@ class _LocalBackupExperienceState extends State<LocalBackupExperience> {
}
if (Platform.isAndroid) {
+ if (fullPath.startsWith('content://')) {
+ final decoded = Uri.decodeComponent(fullPath.split('/').last);
+ return decoded.replaceFirst('primary:', '');
+ }
+
const rootsToRemove = <String>[
'/storage/emulated/0/',
'/storage/self/primary/',
@@ -517,40 +570,109 @@ class _LocalBackupExperienceState extends State<LocalBackupExperience> {
return fullPath;
}
- Future<bool> _pickAndSaveBackupLocation({String? successMessage}) async {
- String? directoryPath = await FilePicker.platform.getDirectoryPath();
-
- if (directoryPath != null) {
- final saved = await _persistLocation(
- directoryPath,
- successMessage:
- successMessage ?? context.l10n.locationUpdatedAndBackupCreated,
- );
+ Future<bool> _pickAndSaveBackupLocation({
+ String? successMessage,
+ bool requireSelection = false,
+ }) async {
+ if (Platform.isAndroid) {
+ final saved = await _pickAndPersistAndroidLocation();
if (saved) {
await LocalBackupService.instance.triggerAutomaticBackup();
+ } else if (requireSelection) {
+ _showSnackBar('Select a folder to continue');
}
return saved;
+ } else {
+ String? directoryPath = await FilePicker.platform.getDirectoryPath();
+
+ if (directoryPath != null) {
+ final saved = await _persistLocation(
+ directoryPath,
+ successMessage:
+ successMessage ?? context.l10n.locationUpdatedAndBackupCreated,
+ );
+ if (saved) {
+ await LocalBackupService.instance.triggerAutomaticBackup();
+ }
+ return saved;
+ }
+ if (requireSelection) {
+ _showSnackBar('Select a folder to continue');
+ }
+ return false;
}
- return false;
}
Future<bool> _persistLocation(
String path, {
String? successMessage,
}) async {
+ final prefs = await SharedPreferences.getInstance();
+ Future<bool> savePath(String target) async {
+ try {
+ await Directory(target).create(recursive: true);
+ await prefs.setString('autoBackupPath', target);
+ await prefs.remove(_treeUriKey);
+ await prefs.setBool(_locationConfiguredKey, true);
+ if (!mounted) return false;
+ setState(() {
+ _backupPath = target;
+ _backupTreeUri = null;
+ });
+ if (successMessage != null) {
+ _showSnackBar(successMessage);
+ }
+ return true;
+ } catch (_) {
+ return false;
+ }
+ }
+
+ if (await savePath(path)) {
+ return true;
+ }
+
+ if (Platform.isAndroid) {
+ final fallbackPath = await _androidPrivateBackupPath();
+ if (fallbackPath != null && fallbackPath != path) {
+ final savedFallback = await savePath(fallbackPath);
+ if (savedFallback) {
+ return true;
+ }
+ }
+ }
+
+ _showSnackBar(context.l10n.noDefaultBackupFolder);
+ return false;
+ }
+
+ Future<String?> _androidPrivateBackupPath() async {
+ final androidBasePath = await _androidBackupBasePath();
+ return androidBasePath != null ? '$androidBasePath/EnteAuthBackups' : null;
+ }
+
+ Future<bool> _pickAndPersistAndroidLocation() async {
+ final saf = SafUtil();
+ final picked = await saf.pickDirectory();
+ final treeUri = picked?.uri;
+ if (treeUri == null || treeUri.isEmpty) {
+ return false;
+ }
+
+ return _persistAndroidLocation(treeUri);
+ }
+
+ Future<bool> _persistAndroidLocation(String treeUri) async {
final prefs = await SharedPreferences.getInstance();
try {
- await Directory(path).create(recursive: true);
- await prefs.setString('autoBackupPath', path);
+ await prefs.setString(_treeUriKey, treeUri);
await prefs.setBool(_locationConfiguredKey, true);
if (!mounted) return false;
setState(() {
- _backupPath = path;
- _hasConfiguredLocation = true;
+ _backupTreeUri = treeUri;
+ _backupPath = null;
});
- if (successMessage != null) {
- _showSnackBar(successMessage);
- }
+ _showSnackBar(context.l10n.locationUpdatedAndBackupCreated);
return true;
} catch (_) {
_showSnackBar(context.l10n.noDefaultBackupFolder);
@@ -558,6 +680,20 @@ class _LocalBackupExperienceState extends State<LocalBackupExperience> {
}
}
+ Future<String?> _androidBackupBasePath() async {
+ Directory directory = Directory('/storage/emulated/0/Download');
+ if (await directory.exists()) {
+ return directory.path;
+ }
+
+ final externalDir = await getExternalStorageDirectory();
+ if (externalDir != null) {
+ return externalDir.path;
+ }
+
+ return null;
+ }
+
void _showSnackBar(String message) {
if (!mounted) return;
ScaffoldMessenger.of(context).hideCurrentSnackBar();
diff --git a/mobile/apps/auth/lib/ui/settings/data/local_backup_settings_page.dart b/mobile/apps/auth/lib/ui/settings/data/local_backup_settings_page.dart
index 63260ca2ef..d00d44adc2 100644
--- a/mobile/apps/auth/lib/ui/settings/data/local_backup_settings_page.dart
+++ b/mobile/apps/auth/lib/ui/settings/data/local_backup_settings_page.dart
@@ -4,6 +4,7 @@ import 'package:ente_auth/ui/components/captioned_text_widget.dart';
import 'package:ente_auth/ui/components/menu_item_widget.dart';
import 'package:ente_auth/ui/components/toggle_switch_widget.dart';
import 'package:ente_auth/ui/settings/data/local_backup/local_backup_experience.dart';
+import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
const _autoBackupToggleCopy =
@@ -55,7 +56,7 @@ class LocalBackupAppLockVariantPage extends StatelessWidget {
Padding(
padding: const EdgeInsets.only(top: 12, left: 12, right: 12),
child: Text(
- _autoBackupToggleCopy,
+ '$_autoBackupToggleCopy\n\nBackups are retained up to 5 files.',
style: textTheme.miniFaint,
),
),
@@ -148,9 +149,58 @@ class LocalBackupAppLockVariantPage extends StatelessWidget {
),
),
),
+ if (kDebugMode) ...[
+ const SizedBox(height: 12),
+ SizedBox(
+ width: double.infinity,
+ child: TextButton(
+ onPressed: () async {
+ await controller.runManualBackup();
+ },
+ style: TextButton.styleFrom(
+ foregroundColor: colorScheme.textBase,
+ backgroundColor: colorScheme.fillFaint,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(12),
+ ),
+ padding:
+ const EdgeInsets.symmetric(vertical: 12),
+ ),
+ child: Text(
+ 'Backup now',
+ style: textTheme.bodyBold,
+ ),
+ ),
+ ),
+ ],
],
)
- : const SizedBox.shrink(),
+ : (kDebugMode
+ ? Padding(
+ padding: const EdgeInsets.only(top: 12),
+ child: SizedBox(
+ width: double.infinity,
+ child: TextButton(
+ onPressed: () async {
+ await controller.resetBackupLocation();
+ },
+ style: TextButton.styleFrom(
+ foregroundColor: colorScheme.textBase,
+ backgroundColor: colorScheme.fillFaint,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(12),
+ ),
+ padding:
+ const EdgeInsets.symmetric(vertical: 12),
+ ),
+ child: Text(
+ 'Reset backup folder',
+ style: textTheme.bodyBold,
+ ),
+ ),
+ ),
+ )
+ : const SizedBox.shrink()),
),
],
),
@@ -225,30 +275,20 @@ class _LocationPreview extends StatelessWidget {
Widget build(BuildContext context) {
final textTheme = getEnteTextTheme(context);
final path = controller.backupPath;
+ final treeUri = controller.backupTreeUri;
final muted = textTheme.miniFaint.copyWith(color: Colors.grey);
if (path != null) {
return Text(controller.simplifyPath(path), style: textTheme.miniFaint);
}
+ if (treeUri != null) {
+ return Text(
+ controller.simplifyPath(treeUri),
+ style: textTheme.miniFaint,
+ );
+ }
- return FutureBuilder<String>(
- future: controller.resolveDefaultPath(),
- builder: (context, snapshot) {
- if (snapshot.connectionState == ConnectionState.waiting) {
- return Text(context.l10n.loadDefaultLocation, style: muted);
- }
- if (snapshot.hasError) {
- return Text(
- context.l10n.couldNotDetermineLocation,
- style: muted.copyWith(color: Colors.redAccent),
- );
- }
- return Text(
- controller.simplifyPath(snapshot.data ?? ''),
- style: textTheme.miniFaint,
- );
- },
- );
+ return Text('Select a backup folder', style: muted);
}
}
diff --git a/mobile/apps/auth/macos/Runner/DebugProfile.entitlements b/mobile/apps/auth/macos/Runner/DebugProfile.entitlements
index ac146be3a7..094be41732 100644
--- a/mobile/apps/auth/macos/Runner/DebugProfile.entitlements
+++ b/mobile/apps/auth/macos/Runner/DebugProfile.entitlements
@@ -10,7 +10,7 @@
<true/>
<key>com.apple.security.network.client</key>
<true/>
- <key>com.apple.security.files.user-selected.read-only</key>
+ <key>com.apple.security.files.user-selected.read-write</key>
<true/>
<key>keychain-access-groups</key>
<array/>
diff --git a/mobile/apps/auth/macos/Runner/Release.entitlements b/mobile/apps/auth/macos/Runner/Release.entitlements
index 191a093049..f9f0dc66a2 100644
--- a/mobile/apps/auth/macos/Runner/Release.entitlements
+++ b/mobile/apps/auth/macos/Runner/Release.entitlements
@@ -6,7 +6,7 @@
<true/>
<key>com.apple.security.files.downloads.read-write</key>
<true/>
- <key>com.apple.security.files.user-selected.read-only</key>
+ <key>com.apple.security.files.user-selected.read-write</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
diff --git a/mobile/apps/auth/pubspec.lock b/mobile/apps/auth/pubspec.lock
index d75c6aec11..301a54eedc 100644
--- a/mobile/apps/auth/pubspec.lock
+++ b/mobile/apps/auth/pubspec.lock
@@ -1399,6 +1399,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.1.0"
+ saf_stream:
+ dependency: "direct main"
+ description:
+ name: saf_stream
+ sha256: c05449997698c481a03e428162a999f93b1ee1bcc0349d651899a59f7b10230a
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.12.3"
+ saf_util:
+ dependency: "direct main"
+ description:
+ name: saf_util
+ sha256: "219f983e5f17b28998335158cdc97add9d52af9884e38b5a43f10dcc070510ec"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.11.0"
screen_retriever:
dependency: transitive
description:
diff --git a/mobile/apps/auth/pubspec.yaml b/mobile/apps/auth/pubspec.yaml
index 18552ce9a9..72a4fa742d 100644
--- a/mobile/apps/auth/pubspec.yaml
+++ b/mobile/apps/auth/pubspec.yaml
@@ -120,6 +120,8 @@ dependencies:
url: https://github.com/juliuscanute/qr_code_scanner
ref: a2d31633d4744f72ada87cfa85d221358ab082af
qr_flutter: ^4.1.0
+ saf_stream: any
+ saf_util: any
sentry: ^8.14.2
sentry_flutter: ^8.14.2
share_plus: ^11.0.0