1

In the findOrCreateUser function, I'm returning a promise, that I then fulfill with a user document from mongoDB.

Then it gives this error You are trying to access the attribute/method configured by findUserById, which you did not configure

I used this guy's tutorial http://nodetuts.com/tutorials/26-starting-with-everyauth.html#video He didn't do any of that. Why does it even need a findUserById function? I'm returning to it the entire document, not just an id.

So, yeah, how do I correct this? I thought after you returned your promise, everyauth was good to go.

Farzher
  • 13,934
  • 21
  • 69
  • 100

1 Answers1

4

not sure if you have got around this or not, but I found adding in the following before you start telling it the api id's and secrets sorted it for me:

everyauth.everymodule
  .findUserById( function (id, callback) {
    callback(null, usersById[id]);
  });
iki
  • 56
  • 1