Closed jlpellicer closed 7 years ago
Hi @jlpellicer
Have you made any progress? I am dealing with a similar problem trying to use passport-custom but I can`t find documentation about how integrate it with feathers.
I think "Authentication strategy 'apikey' failed" because you have not defined apikey strategy. passport-custom allow define your own strategy:
passport.use('strategy-name', new CustomStrategy(
function(req, callback) {
// Do your custom user finding logic here, or set to false based on req object
callback(null, user);
}
));
Any ideas will be welcome ;-)
Salu2 Fernando
This one might help you guys out: https://docs.feathersjs.com/guides/auth/recipe.custom-auth-strategy.html (the Creating a Custom API Key Auth Strategy
section esp.)
I want to add API keys authentication to my feathesjs app. It should work by sending a header with a key assigned to the client, which should be checked against a database for validation.
So, if I understand correctly, I could potentially use feathers-authentication-jwt to do this (https://docs.feathersjs.com/api/authentication/jwt.html) by tweaking the
configuration
andVerifier
.Seems that my problem is that I can't get my
Verifier
to work and the default one is invoked, so noauthentication
for you, let me show you.What happens when I try to
authorize
? I try like this:I get this response:
Which, if I'm not mistaken, it means that my
Verifier
is not being used, so it fails because it isn't ajwt
.So, first, am I on the right track? I mean, can I use this strategy to authenticate by API keys?
Second, if so, what am I doing wrong?
Thanks!