π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Rename
Neeraj Gupta9f28e5ef7961
diff --git a/mobile/lib/services/passkey_service.dart b/mobile/lib/services/passkey_service.dartindex 4623f55028..07a22f5a6d 100644--- a/mobile/lib/services/passkey_service.dart+++ b/mobile/lib/services/passkey_service.dart@@ -3,7 +3,6 @@ import "package:logging/logging.dart";import "package:photos/core/network/network.dart";import "package:photos/utils/dialog_util.dart";import 'package:url_launcher/url_launcher_string.dart';-import "package:uuid/uuid.dart";class PasskeyService {PasskeyService._privateConstructor();@@ -18,11 +17,11 @@ class PasskeyService {return response.data!["accountsToken"] as String;}- Future<bool> isPassKeyRecoveryEnabled() async {+ Future<bool> isPasskeyRecoveryEnabled() async {final response = await _enteDio.get("/users/two-factor/recovery-status",);- return response.data!["isPassKeyRecoveryEnabled"] as bool;+ return response.data!["isPasskeyRecoveryEnabled"] as bool;}Future<void> configurePasskeyRecovery(@@ -31,7 +30,7 @@ class PasskeyService {String userSecretNonce,) async {await _enteDio.post(- "/users/two-factor/passkeys/configure-reset",+ "/users/two-factor/passkeys/configure-recovery",data: {"secret": secret,"userSecretCipher": userEncryptedSecret,diff --git a/mobile/lib/ui/settings/security_section_widget.dart b/mobile/lib/ui/settings/security_section_widget.dartindex 72cbd3b245..5099bc5d3c 100644--- a/mobile/lib/ui/settings/security_section_widget.dart+++ b/mobile/lib/ui/settings/security_section_widget.dart@@ -114,7 +114,7 @@ class _SecuritySectionWidgetState extends State<SecuritySectionWidget> {pressedColor: getEnteColorScheme(context).fillFaint,trailingIcon: Icons.chevron_right_outlined,trailingIconIsMuted: true,- onTap: () async => await onPassKeyClick(context),+ onTap: () async => await onPasskeyClick(context),),sectionOptionSpacing,MenuItemWidget(@@ -236,14 +236,14 @@ class _SecuritySectionWidgetState extends State<SecuritySectionWidget> {);}- Future<void> onPassKeyClick(BuildContext buildContext) async {+ Future<void> onPasskeyClick(BuildContext buildContext) async {try {final isPassKeyResetEnabled =- await PasskeyService.instance.isPassKeyRecoveryEnabled();+ await PasskeyService.instance.isPasskeyRecoveryEnabled();if (!isPassKeyResetEnabled) {final Uint8List recoveryKey =await UserService.instance.getOrCreateRecoveryKey(context);- final String resetSecret = const Uuid().v4().toString();+ final resetSecret = const Uuid().v4().toString();final bytes = utf8.encode(resetSecret);final base64Str = base64.encode(bytes);final encryptionResult = CryptoUtil.encryptSync(