fix: Cake-2FA-setup-issue (#1097)

* fix: Cake 2FA setup issue

* fix: 2FA Setup issue

* fix: 2FA setup bug
This commit is contained in:
Adegoke David
2023-09-28 21:40:15 +03:00
committed by GitHub
parent dc36c31197
commit f07062d987
6 changed files with 30 additions and 34 deletions
+4 -2
View File
@@ -53,8 +53,10 @@ class Setup2FAPage extends BasePage {
SizedBox(height: 86),
SettingsCellWithArrow(
title: S.current.setup_totp_recommended,
handler: (_) => Navigator.of(context)
.pushReplacementNamed(Routes.setup_2faQRPage),
handler: (_) {
setup2FAViewModel.generateSecretKey();
return Navigator.of(context).pushReplacementNamed(Routes.setup_2faQRPage);
},
),
StandardListSeparator(padding: EdgeInsets.symmetric(horizontal: 24)),
],
@@ -89,7 +89,7 @@ class Setup2FAQRPage extends BasePage {
),
SizedBox(height: 8),
Text(
'${setup2FAViewModel.secretKey}',
'${setup2FAViewModel.totpSecretKey}',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w700,
@@ -108,7 +108,7 @@ class Setup2FAQRPage extends BasePage {
child: InkWell(
onTap: () {
ClipboardUtil.setSensitiveDataToClipboard(
ClipboardData(text: '${setup2FAViewModel.secretKey}'));
ClipboardData(text: '${setup2FAViewModel.totpSecretKey}'));
showBar<void>(context, S.of(context).copied_to_clipboard);
},
child: Container(