diff --git a/lib/store/settings_store.dart b/lib/store/settings_store.dart index e792ee3b0..0ffedec90 100644 --- a/lib/store/settings_store.dart +++ b/lib/store/settings_store.dart @@ -997,7 +997,7 @@ abstract class SettingsStoreBase with Store { final totpSecretKey = await SecureKey.getString( secureStorage: secureStorage, sharedPreferences: sharedPreferences, - key: SecureKey.useTOTP2FA, + key: SecureKey.totpSecretKey, ) ?? ''; @@ -1243,7 +1243,7 @@ abstract class SettingsStoreBase with Store { totpSecretKey = await SecureKey.getString( secureStorage: _secureStorage, sharedPreferences: sharedPreferences, - key: SecureKey.useTOTP2FA, + key: SecureKey.totpSecretKey, ) ?? totpSecretKey; diff --git a/lib/view_model/set_up_2fa_viewmodel.dart b/lib/view_model/set_up_2fa_viewmodel.dart index 9587e3075..7347b32a8 100644 --- a/lib/view_model/set_up_2fa_viewmodel.dart +++ b/lib/view_model/set_up_2fa_viewmodel.dart @@ -27,7 +27,9 @@ abstract class Setup2FAViewModelBase with Store { unhighlightTabs = false, selected2FASettings = ObservableList(), state = InitialExecutionState() { - selectCakePreset(selectedCake2FAPreset); + if (selectedCake2FAPreset != Cake2FAPresetsOptions.none) { + selectCakePreset(selectedCake2FAPreset); + } reaction((_) => state, _saveLastAuthTime); }