Correct way of storing API Keys in flutter following best practises

前端 未结 4 1200
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-23 14:36

Which is the correct way(best practice) of adding secret API keys in flutter in case I want to push the code on github. I\'ve made a simple app that consumes an API b

4条回答
  •  太阳男子
    2020-12-23 15:08

    For secure storage you have to rely on the corresponding native platforms, both iOs and Android provide a mechanism to securely store keys. You can implement it by yourself and use the flutter channels to obtain and store the keys. Information about this mechanism can be read here:

    Android Keystore

    iOs KeyChain

    Also, you can use this flutter plugin, which uses the services mentioned above and provides a dart object to access the secure storage.

提交回复
热议问题