Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[auth] Fix 2fa recovery flow

Neeraj Gupta782ef5eeb072
diff --git a/auth/lib/services/user_service.dart b/auth/lib/services/user_service.dart
index 2e7ec59207..083b8f1712 100644
--- a/auth/lib/services/user_service.dart
+++ b/auth/lib/services/user_service.dart
@@ -877,6 +877,7 @@ class UserService {
"twoFactorType": twoFactorTypeToString(type),
},
);
+ await dialog.hide();
if (response.statusCode == 200) {
// ignore: unawaited_futures
Navigator.of(context).pushAndRemoveUntil(
@@ -974,6 +975,7 @@ class UserService {
"twoFactorType": twoFactorTypeToString(type),
},
);
+ await dialog.hide();
if (response.statusCode == 200) {
showShortToast(
context,
diff --git a/auth/lib/ui/two_factor_recovery_page.dart b/auth/lib/ui/two_factor_recovery_page.dart
index c458c001e5..2f6ea02c55 100644
--- a/auth/lib/ui/two_factor_recovery_page.dart
+++ b/auth/lib/ui/two_factor_recovery_page.dart
@@ -1,6 +1,7 @@
import 'package:ente_auth/l10n/l10n.dart';
import 'package:ente_auth/models/account/two_factor.dart';
import 'package:ente_auth/services/user_service.dart';
+import 'package:ente_auth/theme/ente_theme.dart';
import 'package:ente_auth/utils/email_util.dart';
import 'package:flutter/material.dart';
@@ -97,7 +98,8 @@ class _TwoFactorRecoveryPageState extends State<TwoFactorRecoveryPage> {
style: TextStyle(
decoration: TextDecoration.underline,
fontSize: 12,
- color: Colors.white.withOpacity(0.9),
+ color:
+ getEnteColorScheme(context).textBase.withOpacity(0.9),
),
),
),
diff --git a/mobile/lib/services/user_service.dart b/mobile/lib/services/user_service.dart
index b94933f9d9..0b36509c02 100644
--- a/mobile/lib/services/user_service.dart
+++ b/mobile/lib/services/user_service.dart
@@ -926,6 +926,7 @@ class UserService {
);
},
),
+ (route) => route.isFirst,
);
}
} on DioError catch (e) {
@@ -1010,6 +1011,7 @@ class UserService {
"twoFactorType": twoFactorTypeToString(type),
},
);
+ await dialog.hide();
if (response.statusCode == 200) {
showShortToast(
context,