Open rehovicova opened 3 years ago
After login, the subsequent request does not carry the token of permission verification,i don't understand why there are such low-level mistakes here, but the problem can be solved in the following ways:
let remoteDb = PouchDB(
http://${dbConfig.host}:5984/${dbConfig.dbName}
,
{
skip_setup: true,
fetch:function(url,opts){
opts.headers.set('Authorization','Basic ' + btoa(dbConfig.username+":"+dbConfig.password'););
}
})
no need this package PouchDB.plugin(require('pouchdb-authentication'))
new PouchDB('url', {
auth: {
username: 'user',
password: 'pass'
}
}
no need this package PouchDB.plugin(require('pouchdb-authentication'))
new PouchDB('url', {
auth: {
username: 'user',
password: 'pass'
}
}
Any progress on this? Facing the same issue.
Expected Behavior
I expect I can query the database after login without getting 401
Current Behavior
I am getting 401 after successful login
Code
Your Environment
PS: I am connecting to the same database from a different project using JavaScript and PouchDB 7.2.1 and auth 1.1.3 (so exactly the same) and it works jut fine