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 running express3-mongoose-multiple-files #74

Closed
oakley808 opened this issue Apr 27, 2014 · 2 comments
Closed

Error running express3-mongoose-multiple-files #74

oakley808 opened this issue Apr 27, 2014 · 2 comments

Comments

@oakley808
Copy link

Hi.
The example "express3-mongoose-multiple-files" doesn't run for me on OSX. I get the following error

examples/express3-mongoose-multiple-files/config/pass.js:40
  console.log(req.user);
                 ^
TypeError: Cannot read property 'user' of undefined
...

Maybe app needs to be passed to pass.js for req to be defined?
The express3-mongoose example seems to work fine.

(I'm using Express 3 and Node v0.10.26)

@oakley808
Copy link
Author

Actually, maybe it's the example app.js file line 34.

app.get('/admin', pass.ensureAuthenticated, pass.ensureAdmin(), user_routes.admin);

Maybe should be:

app.get('/admin', pass.ensureAuthenticated, pass.ensureAdmin, user_routes.admin);

?

@jaredhanson
Copy link
Owner

To reduce the noise of issues filed against examples, I'm moving examples to separate repositories. Please feel free to take ownership of this example by creating a new repo and adding it to the wiki here: https://github.com/jaredhanson/passport-local/wiki/Examples

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

2 participants