jaredhanson / passport

Simple, unobtrusive authentication for Node.js.
https://www.passportjs.org?utm_source=github&utm_medium=referral&utm_campaign=passport&utm_content=about
MIT License
22.94k stars 1.24k forks source link

How to retrieve request inside Strategy? #300

Open sandrocsimas opened 9 years ago

sandrocsimas commented 9 years ago

I want to retrieve the current request object inside the Strategy logic. Is this possible?

brendtumi commented 9 years ago

I need that too. Its a good idea, we may need to take some other informations for auth process

brendtumi commented 9 years ago

I find this: http://stackoverflow.com/questions/11784233/using-passportjs-how-does-one-pass-additional-form-fields-to-the-local-authenti

sandrocsimas commented 9 years ago

Nice, i will try later!

razvanz commented 9 years ago

+1. I have a use case in which I allow authentications that originates from specific IP's or networks, therefore I need to retrieve the remoteAddress from the req object.