【发布时间】:2015-07-13 17:55:40
【问题描述】:
我使用 PouchDB 身份验证插件,我喜欢它。
但是,我对注册过程有点困惑,也许我没有正确使用它。我用它在我的 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
});
问题:有没有办法独立于数据库创建新用户?
【问题讨论】:
标签: authentication couchdb pouchdb