jaredhanson / passport-local

Username and password authentication strategy for Passport and Node.js.
https://www.passportjs.org/packages/passport-local/?utm_source=github&utm_medium=referral&utm_campaign=passport-local&utm_content=about
MIT License
2.74k stars 498 forks source link

Add options.params argument for non-Express environments #98

Closed phanect closed 3 years ago

phanect commented 9 years ago

I'm using passport from Geddy and there is no req.body / req.query. So I want an option to specify params.

coveralls commented 9 years ago

Coverage Status

Coverage remained the same at 97.62% when pulling 15a946a9a83707803e3e0bdd1012ef4560d74e1f on phanect:master into 33d420ba5f54939c85adc5e4b61009db6467a900 on jaredhanson:master.

coveralls commented 9 years ago

Coverage Status

Coverage remained the same at 97.62% when pulling 2d9831856ca5a5f30050ae7cf344d95823098ddd on phanect:master into 33d420ba5f54939c85adc5e4b61009db6467a900 on jaredhanson:master.

coveralls commented 9 years ago

Coverage Status

Coverage remained the same at 97.62% when pulling 7d0ca4b63cd0c707b8311c2f0f845198b25127c8 on phanect:master into 33d420ba5f54939c85adc5e4b61009db6467a900 on jaredhanson:master.

coveralls commented 9 years ago

Coverage Status

Coverage remained the same at 97.62% when pulling 33e1478f9e717fc831ec0e227dc9d3f3232fcc83 on phanect:master into 33d420ba5f54939c85adc5e4b61009db6467a900 on jaredhanson:master.

coveralls commented 9 years ago

Coverage Status

Coverage remained the same at 97.62% when pulling 3da9c61da33e4919da88b01148073d8a204cfed7 on phanect:master into 33d420ba5f54939c85adc5e4b61009db6467a900 on jaredhanson:master.

coveralls commented 9 years ago

Coverage Status

Coverage remained the same at 97.62% when pulling 495945532d5e3ffc6e05bc255f458fbdc9f4b075 on phanect:master into 33d420ba5f54939c85adc5e4b61009db6467a900 on jaredhanson:master.

coveralls commented 9 years ago

Coverage Status

Coverage remained the same at 97.62% when pulling eeb8c0957caa86ac153533251728b89b2ee8a81e on phanect:master into 33d420ba5f54939c85adc5e4b61009db6467a900 on jaredhanson:master.

coveralls commented 9 years ago

Coverage Status

Coverage remained the same at 97.62% when pulling eeb8c0957caa86ac153533251728b89b2ee8a81e on phanect:master into 33d420ba5f54939c85adc5e4b61009db6467a900 on jaredhanson:master.

coveralls commented 9 years ago

Coverage Status

Coverage remained the same at 97.62% when pulling 0efc2e377c476b60c4fde357f01edd52f1cc989f on phanect:master into 33d420ba5f54939c85adc5e4b61009db6467a900 on jaredhanson:master.

phanect commented 9 years ago

@jaredhanson

I have cut off Node.js 0.4 support in this PR. NVM can't install Node.js 0.4 anymore. Is it OK? Or should I do any other work to support 0.4?

coveralls commented 9 years ago

Coverage Status

Coverage remained the same at 97.62% when pulling 5812fb5a8c85c120a55dce47f5878b9fe769a583 on phanect:master into 33d420ba5f54939c85adc5e4b61009db6467a900 on jaredhanson:master.

jaredhanson commented 9 years ago

It's not consistent with the design of Passport to pass credentials into strategies. Strategies are intended to handle parsing of requests and drive verify callbacks accordingly. If you could make this PR parse requests from Geddy, I'd consider merging.

emilong commented 9 years ago

I'd also like to pull credentials from req.params. b46ff4c seems to do that in much the same style as the existing code does from body and query. Did I miss something in this PR that changes the design? If so, is there another approach that you would accept that uses req.params?

Thanks!

rwky commented 6 years ago

@phanect if you make a PR against https://github.com/passport-next/passport-local this will get looked into.

phanect commented 3 years ago

Apologies for leaving this PR open without any response. Let me close this PR.