Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is flutter_secure_storage exactly and how it works?

Tags:

flutter

i work on authentification for my app now. I have heard good things about flutter_secure_storage but i would like to know how it works exactly because i am not sure. I have read it stores data in shared préférences but all data are crypted which would be great for what i need to do. Is it true ? And is it really secure ? Can i store the username and password with it with security ? Can we imagine a user log in my app and i store all with this plugin flutter_secure_storage (example : i can store the email or the id of the member crypted so when the user go back on the app if i find the value crypted in shared préférences i redirect him to member page and so i know the member's id in the app when i need it

like image 690
axis-medias Avatar asked Mar 24 '20 23:03

axis-medias


1 Answers

So i decided to user flutter_secure_storage and i do ot like that :

final storage = new FlutterSecureStorage();

// Read value

mail = await storage.read(key: "e");
pass = await storage.read(key: "p");

And for write the keys when signup or login i do it :

final storage = new FlutterSecureStorage();
await storage.write(key: "e", value: email);
await storage.write(key: "p", value: password);

It seems very simple and it works but i Don't understand how it can be crypted. From my side i crypt Nothing i set the email and password How it works exactly ?

like image 151
axis-medias Avatar answered Sep 18 '22 14:09

axis-medias