jaredhanson / passport-http

HTTP Basic and Digest authentication strategies for Passport and Node.js.

Home Page:https://www.passportjs.org/packages/passport-http/?utm_source=github&utm_medium=referral&utm_campaign=passport-http&utm_content=about

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

adborden opened this issue · comments

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.

+1

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

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