passport / discuss

A forum for discussing topics related to the usage of Passport.js.
1 stars 0 forks source link

500 TypeError: this.fail is not a function #28

Open iLem0n opened 5 years ago

iLem0n commented 5 years ago

I've build a basic loopback4 application with authentication via passport-http module like described in this https://github.com/strongloop/loopback-next/tree/master/packages/authentication#loopbackauthentication documentation. For each request with auth i receive the following error:

Unhandled error in GET /whoami: 500 TypeError: this.fail is not a function at BasicStrategy.authenticate (/home/node/app/node_modules/passport-http/lib/passport-http/strategies/basic.js:69:37) at AuthenticateActionProvider.action (/home/node/app/node_modules/@loopback/authentication/dist/providers/auth-action.provider.js:55:44) at process._tickCallback (internal/process/next_tick.js:68:7)

Tried to investigate the code but couldn't figure out where this function should come from. Any hints on this ?

byAhmadAli commented 5 years ago

+1!