你可以将我的OpenAI API密钥安全地保存在我的Flutter应用程序中的哪里?

huangapple go评论81阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2023年6月29日 11:38:26
  • 转载请务必保留本文链接:https://go.coder-hub.com/76577916.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定