我应该如何处理APP_KEY和APP_SECRET(Dropbox API) [英] How should I deal with APP_KEY and APP_SECRET (Dropbox API)

查看:99
本文介绍了我应该如何处理APP_KEY和APP_SECRET(Dropbox API)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用Dropbox API编写了一段简单的代码,这意味着我的应用程序使用了APP_KEY和APP_SECRET。假设有人也想使用我的应用。我创建了一个github存储库,推送了代码,依此类推,但是,当然,我没有放置APP_KEY和APP_SECRET 。用户是否必须注册自己的该应用程序实例?还有另一种处理方式吗?也许共享APP_KEY和APP_SECRET足够安全了,这样就可以了吗?

I've written a simple piece of code using Dropbox API, which implies usage of APP_KEY and APP_SECRET of my app. Let's suppose someone wants to use my app too. I create a github repo, push the code and so on, but, of course, I don't put APP_KEY and APP_SECRET values. Do users have to register their own instances of this application? Is there another way to deal? Maybe sharing APP_KEY and APP_SECRET is enough secure to let it be that way?

换句话说,Dropbox禁止使用用户名-密码对进行身份验证(而他们自己的官方应用确实做到了这一点),但是我想(例如)为KDE的Dolphin制作一个插件,以便从上下文菜单中获取文件的公共链接,而用户甚至都不应该知道所有这些SECRETS,KEYS等。我该怎么办?

In other words, Dropbox prohibits usage of username-password pair for authenticating (while their own official app does exactly that), but I want (for example) to make a plugin for KDE's Dolphin for getting public links to files from context menu and user shouldn't even know about all these SECRETS, KEYS and so on. What should I do?

推荐答案

您可以使用 Dropbox API密钥编码器,并使用 dropbox.js 对其进行解码。这样一来,您无需公开您的秘密密钥

You can encode your key using Dropbox API Key Encoder and use dropbox.js to decode it. That way you do not need to expose your secret key

这篇关于我应该如何处理APP_KEY和APP_SECRET(Dropbox API)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆