π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Merge branch 'main' into beta
Prateek Sunal5fe5ac09358c
diff --cc auth/lib/l10n/arb/app_en.arbindex e2572b7ca3,9ac0c98992..7af9ce901b--- a/auth/lib/l10n/arb/app_en.arb+++ b/auth/lib/l10n/arb/app_en.arb@@@ -409,5 -406,7 +410,8 @@@"doNotSignOut": "Do not sign out","hearUsWhereTitle": "How did you hear about Ente? (optional)","hearUsExplanation": "We don't track app installs. It'd help if you told us where you found us!",- "recoveryKeySaved": "Recovery key saved in Downloads folder!"++ "recoveryKeySaved": "Recovery key saved in Downloads folder!",+ "waitingForBrowserRequest": "Waiting for browser request...",+ "launchPasskeyUrlAgain": "Launch passkey URL again",+ "passkey": "Passkey"}diff --cc auth/lib/main.dartindex 15fcab4a45,d459dfa133..23ff8748c1--- a/auth/lib/main.dart+++ b/auth/lib/main.dart@@@ -35,21 -33,11 +35,23 @@@ final _logger = Logger("main")void main() async {WidgetsFlutterBinding.ensureInitialized();++ await windowManager.ensureInitialized();++ if (PlatformUtil.isDesktop()) {+ WindowOptions windowOptions = const WindowOptions(+ size: Size(450, 800),+ );+ windowManager.waitUntilReadyToShow(windowOptions, () async {+ await windowManager.show();+ await windowManager.focus();+ });+ }await _runInForeground();await _setupPrivacyScreen();- if (Platform.isAndroid) FlutterDisplayMode.setHighRefreshRate();+ if (Platform.isAndroid) {+ FlutterDisplayMode.setHighRefreshRate().ignore();+ }}Future<void> _runInForeground() async {diff --cc auth/lib/services/user_service.dartindex bc043d20dc,e4a1bae7a4..4c0cf1ebdf--- a/auth/lib/services/user_service.dart+++ b/auth/lib/services/user_service.dart@@@ -26,11 -26,12 +26,12 @@@ import 'package:ente_auth/ui/account/paimport 'package:ente_auth/ui/account/recovery_page.dart';import 'package:ente_auth/ui/common/progress_dialog.dart';import 'package:ente_auth/ui/home_page.dart';+ import 'package:ente_auth/ui/passkey_page.dart';import 'package:ente_auth/ui/two_factor_authentication_page.dart';import 'package:ente_auth/ui/two_factor_recovery_page.dart';-import 'package:ente_auth/utils/crypto_util.dart';import 'package:ente_auth/utils/dialog_util.dart';import 'package:ente_auth/utils/toast_util.dart';+import 'package:ente_crypto_dart/ente_crypto_dart.dart';import "package:flutter/foundation.dart";import 'package:flutter/material.dart';import 'package:logging/logging.dart';@@@ -486,6 -514,7 +514,7 @@@ class UserService// ignore: need to calculate secret to get M1, unused_local_variablefinal clientS = client.calculateSecret(serverB);final clientM = client.calculateClientEvidenceMessage();- // ignore: unused_local_variable++late Response _;if (setKeysRequest == null) {_ = await _enteDio.post(diff --cc auth/lib/ui/settings/account_section_widget.dartindex 0512ff06e0,eceac521f3..f29e1f296e--- a/auth/lib/ui/settings/account_section_widget.dart+++ b/auth/lib/ui/settings/account_section_widget.dart@@@ -11,11 -13,11 +13,12 @@@ import 'package:ente_auth/ui/componentsimport 'package:ente_auth/ui/settings/common_settings.dart';import 'package:ente_auth/utils/dialog_util.dart';import 'package:ente_auth/utils/navigation_util.dart';+import 'package:ente_auth/utils/platform_util.dart';++import 'package:ente_crypto_dart/ente_crypto_dart.dart';import 'package:flutter/material.dart';-import 'package:flutter_sodium/flutter_sodium.dart';class AccountSectionWidget extends StatelessWidget {- AccountSectionWidget({Key? key}) : super(key: key);+ AccountSectionWidget({super.key});@overrideWidget build(BuildContext context) {@@@ -86,6 -87,41 +89,41 @@@},),sectionOptionSpacing,+ MenuItemWidget(+ captionedTextWidget: CaptionedTextWidget(+ title: l10n.recoveryKey,+ ),+ pressedColor: getEnteColorScheme(context).fillFaint,+ trailingIcon: Icons.chevron_right_outlined,+ trailingIconIsMuted: true,+ onTap: () async {+ final hasAuthenticated = await LocalAuthenticationService.instance+ .requestLocalAuthentication(+ context,+ l10n.authToViewYourRecoveryKey,+ );+ if (hasAuthenticated) {+ String recoveryKey;+ try {+ recoveryKey =- Sodium.bin2hex(Configuration.instance.getRecoveryKey());++ CryptoUtil.bin2hex(Configuration.instance.getRecoveryKey());+ } catch (e) {+ showGenericErrorDialog(context: context);+ return;+ }+ routeToPage(+ context,+ RecoveryKeyPage(+ recoveryKey,+ l10n.ok,+ showAppBar: true,+ onDone: () {},+ ),+ );+ }+ },+ ),+ sectionOptionSpacing,MenuItemWidget(captionedTextWidget: CaptionedTextWidget(title: context.l10n.logout,