在数据库中存储 API 个密钥和秘密

Storing API keys and secrets in database

我正在将 Cloudinary 集成到我的 nodejs 仪表板中,这将允许客户将图像上传到应用程序。但是,我希望它尽可能自动化,但我知道您需要 api 密钥和 api 密钥才能连接到 cloudinary 服务器。将每个客户端 api 密钥存储在我的 db2 数据库中是一种好习惯吗?

您可能想要使用 .env 文件。例如这里:https://github.com/motdotla/dotenv#usage

或者,您可以使用 the unsigned upload widget. using the node sdk or the upload widget