我正在使用Cordova / PhoneGap为Android和iOS创建移动应用程序,并使用IBM的Cloudant数据库进行存储。我正在使用PouchDB javascript库来访问Cloudant数据库。目前我有这个代码来访问它...
I am creating a mobile app for Android and iOS using Cordova/PhoneGap and am using IBM's Cloudant database for storage. I am using the PouchDB javascript library to access the Cloudant database. Currently I have this code to access it...
db = new PouchDB('[myaccount].cloudant/[mydb]', { auth: { username: 'myusername', password: 'mypassword' } });我知道这是非常不安全的,我想知道是否有更安全的连接方式从应用程序内部到我的数据库?
I am aware that this is extremely insecure, and am wondering if there is a more secure way to connect to my database from within the app?
推荐答案您可能要考虑的一个选项是实施服务(例如在云端运行) )用于注册您的应用程序的新用户。注册逻辑可能如下所示:
One option you may like to consider is implementing a service (e.g. running in the cloud) for registering new users of your app. Registration logic could look something like this:
更多推荐
如何使用PouchDB安全连接到Cloudant?
发布评论