3
我使用PouchDB身份验证插件,我喜欢它。PouchDB身份验证:创建新的CouchDB用户
但是,我对注册过程有点困惑,也许我没有以正确的方式使用它。我用它在我的CouchDB数据库中创建新用户,但我不明白为什么它与特定数据库相关联?由于我自己的特定数据库之前创建CouchDB的用户,我必须使用一个虚拟的数据库中创建新用户:
// Create or get a database on the CouchDB server to further create a new user
var remoteDB = new PouchDB('http://169.254.197.198:5984/dummy');
// Signup to this db in order to create new user in the CouchDB server
remoteDB.signUp(document.register.username.value,
document.register.password1.value).then(function (reponse){
}).then(function (reponse) {
// handle response
}).catch(function (error) {
// handle error
});
问题:有没有办法独立数据库中创建一个新用户?
好的,谢谢!只是想知道我是否错过了一些东西。 – hhh
嘿,诺兰!只是想知道:是否存在一些安全问题或类似的东西,禁止PouchDB使用如下方法:PouchDB.signUp()会触发对http:// {my-couchdb-host} /_users/org.couchdb.user的PUT请求:{用户名}?现在我将使用虚拟数据库策略,但是这真的让我感觉不错...... = / –