{"action":"closed","issue":{"url":"https://api.github.com/repos/petkaantonov/bluebird/issues/760","labels_url":"https://api.github.com/repos/petkaantonov/bluebird/issues/760/labels{/name}","comments_url":"https://api.github.com/repos/petkaantonov/bluebird/issues/760/comments","events_url":"https://api.github.com/repos/petkaantonov/bluebird/issues/760/events","html_url":"https://github.com/petkaantonov/bluebird/issues/760","id":105906809,"number":760,"title":"bluebird promisify not working with node-bcrypt compare (does with hash)","user":{"login":"rkoberg","id":83722,"avatar_url":"https://avatars.githubusercontent.com/u/83722?v=3","gravatar_id":"","url":"https://api.github.com/users/rkoberg","html_url":"https://github.com/rkoberg","followers_url":"https://api.github.com/users/rkoberg/followers","following_url":"https://api.github.com/users/rkoberg/following{/other_user}","gists_url":"https://api.github.com/users/rkoberg/gists{/gist_id}","starred_url":"https://api.github.com/users/rkoberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkoberg/subscriptions","organizations_url":"https://api.github.com/users/rkoberg/orgs","repos_url":"https://api.github.com/users/rkoberg/repos","events_url":"https://api.github.com/users/rkoberg/events{/privacy}","received_events_url":"https://api.github.com/users/rkoberg/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-10T21:59:31Z","updated_at":"2015-09-11T12:31:40Z","closed_at":"2015-09-11T12:31:40Z","body":"I am trying to rewrite some callback hell auth to use promises (which I am relatively new to).\r\n```\r\nimport bcrypt, {hash as bcryptHash, compare as bcryptCompare}  from 'bcrypt';\r\nPromise.promisify(bcryptHash);\r\nPromise.promisify(bcryptCompare);\r\n...\r\n  hash(unhashed) {\r\n    const genSaltRounds = 10;\r\n    return bcryptHash(unhashed, genSaltRounds);\r\n  }\r\n\r\n  verifyHash(unhashed, hashed) {\r\n    console.log('authServiceUtil bcrypt.compareSync', bcrypt.compareSync(unhashed, hashed));\r\n    return bcryptCompare(unhashed, hashed);\r\n  }\r\n```\r\nCalling the hash function above works as expected, but not verifyHash, which is always returning undefined. The console.log with the compareSync does work (and prints true in this case).\r\nAny ideas why this does not work?"}}