Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firestore and data encryption in Flutter

Tl;dr.. I'm making a todo app where I store data in Firestore, and I don't want anyone to see it not even the devs from firebase console. I found many encryption pkgs that do the job, like: encrypt. My problem is how to I handle the 'encryption key'. I don't want to keep it local because in my app user can access it's account from different devices, so if the key is stored locally they cannot decrypt thus retrieve their data (notes) from the other device (i hope this makes sense). So, do I send the 'encryption key' to firestore in a seperate collection or ... how should I approache this ?

like image 321
GitGud31 Avatar asked Mar 16 '26 12:03

GitGud31


1 Answers

You could store the key with Firebase Remote Config and retrieve it in the app when you need it.

Firebase Remote Config is a cloud service that lets you change the behavior and appearance of your app without requiring users to download an app update. When using Remote Config, you create in-app default values that control the behavior and appearance of your app. Then, you can later use the Firebase console or the Remote Config backend APIs to override in-app default values for all app users or for segments of your user base.

Check out the documentation for the flutter_remote_config plugin.

like image 166
Victor Eronmosele Avatar answered Mar 19 '26 02:03

Victor Eronmosele