3

Any tutorials on using the Dynamic scope and permissions of the Passport authentication library for Node.

Did not find any in the documentation.

How do we set the user type for the authenticated user?

Is it easier to do in everyauth?

laggingreflex
  • 32,948
  • 35
  • 141
  • 196
kyleED
  • 2,327
  • 2
  • 18
  • 23

1 Answers1

4

You can find an example in the Facebook section of the guide: http://passportjs.org/guide/facebook/

app.get('/auth/facebook',
  passport.authenticate('facebook', { scope: ['read_stream', 'publish_actions'] })
);

Based on your question, I'm not entirely sure that's the info you're looking for. If you want to make authorization/access control decisions based on your user module, that'll need to be handled by a different library in combination with Passport (which is authentication only).

Jared Hanson
  • 15,940
  • 5
  • 48
  • 45
  • 1
    Thanks for the answer: It helped a bit on what I needed. To solve my problem I added the authentication to the user object. Which in combination of your example helped solve my problem. – kyleED Dec 18 '12 at 21:35