jaredhanson / jaredhanson/passport-http
When express app is mounted at non-root endpoint, passport-http returns 400
- Dominant language
- JavaScript
- Stars
- 261
- Forks
- 112
- PR merge metrics
- No merged PRs in 30d
Description
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.
``` javascript
authApp = require('../modules/auth');
app.use('/auth', authApp);
// ../module/auth.js
app.get('/digest', passport.authenticate 'digest');
```
Seems to always yield 400.
Contributor guide
Research direction
Reproduce the failure using the app.use('/auth', authApp) mount and the /digest route with passport.authenticate('digest'), then trace the URI check that produces the 400 response. Done means digest authentication succeeds when the Express app is mounted below the root endpoint.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- express, javascript, node.js
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100