{"action":"opened","issue":{"url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/1500","repository_url":"https://api.github.com/repos/simplabs/ember-simple-auth","labels_url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/1500/labels{/name}","comments_url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/1500/comments","events_url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/1500/events","html_url":"https://github.com/simplabs/ember-simple-auth/issues/1500","id":284098096,"number":1500,"title":"Hi,I'm trying to authenticate my application to pouch db.here's my authenticators file...I'm getting Missing/Invalid DB name error..How can I solve it ?","user":{"login":"mehrajpasha","id":20518128,"avatar_url":"https://avatars3.githubusercontent.com/u/20518128?v=4","gravatar_id":"","url":"https://api.github.com/users/mehrajpasha","html_url":"https://github.com/mehrajpasha","followers_url":"https://api.github.com/users/mehrajpasha/followers","following_url":"https://api.github.com/users/mehrajpasha/following{/other_user}","gists_url":"https://api.github.com/users/mehrajpasha/gists{/gist_id}","starred_url":"https://api.github.com/users/mehrajpasha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mehrajpasha/subscriptions","organizations_url":"https://api.github.com/users/mehrajpasha/orgs","repos_url":"https://api.github.com/users/mehrajpasha/repos","events_url":"https://api.github.com/users/mehrajpasha/events{/privacy}","received_events_url":"https://api.github.com/users/mehrajpasha/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-12-22T08:02:28Z","updated_at":"2017-12-22T08:02:28Z","closed_at":null,"author_association":"NONE","body":"`import Ember from 'ember';\r\nimport PouchDB from 'pouchdb';\r\nimport Base from 'ember-simple-auth/authenticators/base';\r\nimport config from \"../config/environment\";\r\nconsole.log(\"sdsdf\");\r\nexport default Base.extend({\r\n    init() {\r\n        this._super(...arguments);\r\n        var host = this.get(\"http://localhost:5984/roles\");\r\n        let remoteDb = new PouchDB(host, { skipSetup: true });\r\n        this.db = remoteDb;\r\n    },\r\n    restore(properties) {\r\n        const propertiesObject = Ember.Object.create(properties);\r\n\r\n        return new Ember.RSVP.Promise((resolve, reject) => {\r\n            if (!Ember.isEmpty(propertiesObject.get('name'))) {\r\n                resolve(properties);\r\n            } else {\r\n                reject();\r\n            }\r\n        });\r\n    },\r\n\r\n    authenticate(username, password) {\r\n        return new Ember.RSVP.Promise((resolve, reject) => {\r\n            this.db.login(username, password).then((response) => {\r\n                Ember.run(function() {\r\n                    resolve({\r\n                        name: response.name\r\n                    });\r\n                });\r\n            }).catch((e) => {\r\n                Ember.run(function() {\r\n                    reject(e);\r\n                });\r\n            })\r\n        });\r\n    },\r\n    //(data)\r\n    invalidate() {\r\n        return this.db.logout();\r\n    }\r\n});\r\n`"}}
{"actor":{"display_login":"mehrajpasha"}}