[auth] Fix 2fa recovery flow

This commit is contained in:
Neeraj Gupta 2025-01-30 11:55:07 +05:30
parent 7fc7d365ad
commit 782ef5eeb0
3 changed files with 7 additions and 1 deletions

View File

@ -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,

View File

@ -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),
),
),
),

View File

@ -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,