英文:
Where I can save my openai-apikey safely for my flutter app
问题
我正在尝试在我的Flutter应用中使用OpenAI的功能,但目前我没有经验来安全且高效地保存API密钥等信息。我了解到可以将我的OpenAI API密钥保存在Firebase的某个地方,然后让Flutter客户端访问Firebase以获取对OpenAI的访问权限。
但目前我不知道完全正确的处理此问题的流程或代码示例,是否有人可以分享一些关于在Flutter和Firebase之间保存API密钥的文章或现有方法?同时,分享一些成本或耗时的利弊将非常有帮助。
英文:
I am trying using ability of openai for my flutter app, but for now I don't have experience to save apikey safely and efficiently etc. I learned that I can save my openai apikey somewhere in the firebase and let flutter client visit the firebase to get the access to openai.
But for now I do not know the total correct process or code example to handle this issue, could someone share some article or some existing method between flutter and firebase for saving apikey saving? It could be great to share the dis-and-advantage for costs or time-consuming.
答案1
得分: -1
另一个解决方案是使用'--dart-define'环境标志。
英文:
One other solution is to use the '--dart-define' environment flag.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论