TypeError: undefined is not a function at oauth2.js:40:3. This is what happens when I do a post request on oauth2/token/
itsyogesh opened this issue · 1 comments
TypeError: undefined is not a function
at Promise. (/Users/apple/Web/gottago/controllers/oauth2.js:40:3)
at Promise. (/Users/apple/Web/gottago/node_modules/mongoose/node_modules/mpromise/lib/promise.js:177:8)
at Promise.EventEmitter.emit (events.js:98:17)
at Promise.emit (/Users/apple/Web/gottago/node_modules/mongoose/node_modules/mpromise/lib/promise.js:84:38)
at Promise.fulfill (/Users/apple/Web/gottago/node_modules/mongoose/node_modules/mpromise/lib/promise.js:97:20)
at handleSave (/Users/apple/Web/gottago/node_modules/mongoose/lib/model.js:132:13)
at /Users/apple/Web/gottago/node_modules/mongoose/lib/utils.js:408:16
at /Users/apple/Web/gottago/node_modules/mongoose/node_modules/mongodb/lib/mongodb/collection/core.js:123:9
at /Users/apple/Web/gottago/node_modules/mongoose/node_modules/mongodb/lib/mongodb/db.js:1131:7
at /Users/apple/Web/gottago/node_modules/mongoose/node_modules/mongodb/lib/mongodb/db.js:1847:9
Can't help just looking at this log. Try setting a breakpoint in token
endpoint and running it step-by-step.