Open goltra opened 6 years ago
Hello, I have a weird problem. I'm doing login() and after getUser() with your plugin and only on iOs and only first time I open app, I get 404. This is the error:
{"error":"not_found","reason":"missing","status":404,"name":"not_found","message":"missing"}
If I close my app and open again, all is working fine.
This is my code:
PouchDB.plugin(PouchAuth); this.auth = new PouchDB(this.couchserver + '_users', { skip_setup: true }); let ajaxOps = { ajax: { headers: { Authorization: 'Basic ' + window.btoa(usuario + ':' + password) }, body: { name: usuario, password: password } } } this.auth.logIn(usuario, password, ajaxOps).then(data => { if (data.ok != undefined && data.ok == true) { this.auth.getUser(usuario).then(data => { resolve(data); }, err => { reject(err); }) } }
As I said, if I close my app and run again and it works fine. I can figure out where is the problem.
kind same problem here https://github.com/pouchdb-community/pouchdb-authentication/issues/232 will not work on MACOS safari neither but with PWA integration there is no problem)))
Hello, I have a weird problem. I'm doing login() and after getUser() with your plugin and only on iOs and only first time I open app, I get 404. This is the error:
If I close my app and open again, all is working fine.
This is my code:
As I said, if I close my app and run again and it works fine. I can figure out where is the problem.