π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Explain unavailable offline Auth key
Neeraj Gupta0e0e4480ffb7
diff --git a/mobile/apps/auth/lib/app/view/app.dart b/mobile/apps/auth/lib/app/view/app.dartindex 48d063c281..0fa2ee55f2 100644--- a/mobile/apps/auth/lib/app/view/app.dart+++ b/mobile/apps/auth/lib/app/view/app.dart@@ -142,13 +142,18 @@ class _AppState extends State<App> with WidgetsBindingObserver {}Map<String, WidgetBuilder> get _getRoutes {+ final config = Configuration.instance;+ final hasOfflineAccount = config.hasOptedForOfflineMode();+ final isOfflineKeyMissing =+ hasOfflineAccount && config.getOfflineSecretKey() == null;return {"/": (context) =>- Configuration.instance.hasConfiguredAccount() ||- (Configuration.instance.hasOptedForOfflineMode() &&- Configuration.instance.getOfflineSecretKey() != null)+ config.hasConfiguredAccount() ||+ (hasOfflineAccount && !isOfflineKeyMissing)? const HomePage()- : const OnboardingPage(),+ : OnboardingPage(+ showOfflineKeyUnavailableDialog: isOfflineKeyMissing,+ ),};}diff --git a/mobile/apps/auth/lib/onboarding/view/onboarding_page.dart b/mobile/apps/auth/lib/onboarding/view/onboarding_page.dartindex de5e98af6d..ba436160a6 100644--- a/mobile/apps/auth/lib/onboarding/view/onboarding_page.dart+++ b/mobile/apps/auth/lib/onboarding/view/onboarding_page.dart@@ -34,7 +34,12 @@ import 'package:flutter_svg/flutter_svg.dart';import 'package:local_auth/local_auth.dart';class OnboardingPage extends StatefulWidget {- const OnboardingPage({super.key});+ final bool showOfflineKeyUnavailableDialog;++ const OnboardingPage({+ super.key,+ this.showOfflineKeyUnavailableDialog = false,+ });@overrideState<OnboardingPage> createState() => _OnboardingPageState();@@ -68,6 +73,22 @@ class _OnboardingPageState extends State<OnboardingPage> {await autoLogoutAlert(context);});_startAutoScroll();+ if (widget.showOfflineKeyUnavailableDialog) {+ WidgetsBinding.instance.addPostFrameCallback((_) {+ if (!mounted) return;+ final l10n = context.strings;+ unawaited(+ showErrorDialog(+ context,+ l10n.unableToAccessYourCodes,+ l10n.offlineKeyUnavailableMessage,+ isDismissable: false,+ showContactSupport: false,+ dismissButtonLabel: l10n.ok,+ ),+ );+ });+ }super.initState();}diff --git a/mobile/packages/strings/lib/l10n/arb/strings_en.arb b/mobile/packages/strings/lib/l10n/arb/strings_en.arbindex b0ad4aabb0..aef7bcac11 100644--- a/mobile/packages/strings/lib/l10n/arb/strings_en.arb+++ b/mobile/packages/strings/lib/l10n/arb/strings_en.arb@@ -2926,6 +2926,7 @@"offlineHomeSignupBannerAction": "Back up now","offlineHomeSignupBannerDescription": "Encrypted backups across 3 locations to keep your memories safe.","offlineHomeSignupBannerTitle": "Protect your memories forever",+ "offlineKeyUnavailableMessage": "The encryption key for your offline codes is unavailable. Log in or restore from a backup to continue.","offlineModeWarning": "You have chosen to proceed without backups. Please take manual backups to make sure your codes are safe.","offlineNameFaceBannerSubtitle": "Sign up to tag them and easily find their photos later.","offlineNameFaceBannerTitle": "Give this face a name",@@ -4605,6 +4606,7 @@}}},+ "unableToAccessYourCodes": "Unable to access your codes","unableToCheckForUpdatesRightNow": "Unable to check for updates right now","unableToExtractFileInformation": "Unable to extract information from this file","unarchive": "Unarchive",