Replace secure storage with encripted db

This commit is contained in:
Yegor Vialov
2020-05-28 20:23:13 +00:00
parent 7ffba397ce
commit fb00b5d9ff
5 changed files with 22 additions and 34 deletions

View File

@ -73,11 +73,9 @@ class TokenLoginPopup extends Popup {
padding: EdgeInsets.all(20),
child: TextFormField(
onSaved: (newValue) {
final storage = new FlutterSecureStorage();
storage.write(key: "hacl_llt", value: newValue.trim()).then((_) {
Navigator.of(context).pop();
eventBus.fire(SettingsChangedEvent(true));
});
Hive.box(AppSettings.DEFAULT_HIVE_BOX).put(AppSettings.AUTH_TOKEN_KEY, newValue.trim());
Navigator.of(context).pop();
eventBus.fire(SettingsChangedEvent(true));
},
decoration: InputDecoration(
hintText: 'Please enter long-lived token',