Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error accessing github with oauth2. #471

Closed
romankor opened this issue Aug 24, 2014 · 3 comments
Closed

Error accessing github with oauth2. #471

romankor opened this issue Aug 24, 2014 · 3 comments

Comments

@romankor
Copy link

I am trying to use Doorman app that uses everyauth underneath. When trying to authenticate with github oauth i am getting the following error. Where can i configure this function ?

Error: WARNING: You are trying to access the attribute/method configured by `findUserById`, which you did not configure. Time to configure it.
    at EveryModule.(anonymous function) [as findUserById] (/opt/doorman/node_modules/everyauth/lib/modules/everymodule.js:133:13)
    at fetchUserFromSession (/opt/doorman/node_modules/everyauth/index.js:95:43)
    at Object.handle (/opt/doorman/node_modules/everyauth/index.js:43:5)
    at next (/opt/doorman/node_modules/connect/lib/http.js:203:15)
    at Object.checkUser [as handle] (/opt/doorman/app.js:40:5)
    at next (/opt/doorman/node_modules/connect/lib/http.js:203:15)
    at next (/opt/doorman/node_modules/connect/lib/middleware/session.js:323:9)
    at /opt/doorman/node_modules/connect/lib/middleware/session.js:342:9
    at /opt/doorman/node_modules/connect/lib/middleware/session/memory.js:52:9
    at process._tickCallback (node.js:343:11)
@Afterglow
Copy link

I just got the same error using google so whatever causes it isn't limited to github logins

Error: WARNING: You are trying to access the attribute/method configured by `findUserById`, which you did not configure. Time to configure it.
    at EveryModule.(anonymous function) [as findUserById] (/opt/doorman/node_modules/everyauth/lib/modules/everymodule.js:133:13)
    at fetchUserFromSession (/opt/doorman/node_modules/everyauth/index.js:95:43)
    at Object.handle (/opt/doorman/node_modules/everyauth/index.js:43:5)
    at next (/opt/doorman/node_modules/connect/lib/http.js:203:15)
    at Object.checkUser [as handle] (/opt/doorman/app.js:40:5)
    at next (/opt/doorman/node_modules/connect/lib/http.js:203:15)
    at next (/opt/doorman/node_modules/connect/lib/middleware/session.js:323:9)
    at /opt/doorman/node_modules/connect/lib/middleware/session.js:342:9
    at /opt/doorman/node_modules/connect/lib/middleware/session/memory.js:52:9
    at process._tickCallback (node.js:419:13)

@bnoguchi
Copy link
Owner

bnoguchi commented Sep 2, 2014

Assuming you're using express 3.x (not 4.x), please refer to https://github.com/bnoguchi/everyauth#accessing-the-user

everyauth.everymodule.findUserById( function (userId, callback) {
  User.findById(userId, callback);
  // callback has the signature, function (err, user) {...}
});

@bnoguchi bnoguchi closed this as completed Sep 2, 2014
@Afterglow
Copy link

From what I could see I think this bug should probably be filed against Doorman not everyauth. Thanks for the explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants