jaredhanson / passport-http

HTTP Basic and Digest authentication strategies for Passport and Node.js.
https://www.passportjs.org/packages/passport-http/?utm_source=github&utm_medium=referral&utm_campaign=passport-http&utm_content=about
MIT License
268 stars 110 forks source link

When express app is mounted at non-root endpoint, passport-http returns 400 #43

Open adborden opened 9 years ago

adborden commented 9 years ago

Mounting an app at a non-root endpoint fails on the uri check because passport-http is only checking the relative uri as seen by the express app, not by the uri as seen by the client. e.g.

authApp = require('../modules/auth');
app.use('/auth', authApp);

// ../module/auth.js
app.get('/digest', passport.authenticate 'digest');

Seems to always yield 400.

mauron85 commented 8 years ago

+1

fchu commented 7 years ago

+1

fchu commented 7 years ago

Uh sorry just saw there was already a pull request! @jaredhanson please accept either fix :)

libinvarghese commented 4 years ago

@jaredhanson Any update on merge? #44 works for me.