jaredhanson / jaredhanson/passport-http
Basic & Digest authentication not working for some reason...
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 261
- Forks
- 112
- PR merge metrics
- No merged PRs in 30d
Description
Hi There,
I have been using Passport for numerous years now. In the current platform that I run, I use Passport's local strategy for authentication. This has been working fine for several months.
Today, I added a new Basic Strategy authentication system to the mix. This is completely separate from the standard Local Strategy that already exists.
My code is as follows:
var basic = require('passport-http').BasicStrategy;
passport.use(new basic({},
function(username, password, done) {
console.log('here we are');
}
));
and the following is part of a different function
if(path == '/the/correct/path'){
console.log('OUTSIDE AUTH');
passport.authenticate('basic', { session: false }, function(req, res){
console.log('INSIDE AUTH');
});
}
When I make a request to /the/correct/path, OUTSIDE AUTH gets printed properly. However, I then expect here we are from the passport.use() function to get printed, which it never. I'm really frustrated, as I have no idea how this is supposed to work...
I have tried accessing this via browser, via curl calls (as per the example), using older & newer versions of the module, and using the DigestStrategy instead of the BasicStrategy. Any advice on what to do would be greatly appreciated... Also I am NOT using express if that makes a difference at all...
Best, and thanks either way,
Sami
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository file or test is named; start by reading the passport-http Basic and Digest usage referenced in the report and reproduce the request using the mentioned browser or curl approaches. Done means the selected strategy's verification callback is reached for the reported path and the behavior is covered by a repository-specific reproduction or test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100