-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
Hi, I'm having a really hard time to implement the authorization in lb4.
I've followed the example in @loopback/authentication package and I'm getting a TypeError:
Unhandled error in GET /ping: 500 TypeError: self.fail is not a function
at verified (project\node_modules\passport-http\lib\passport-http\strategies\basic.js:90:30)
passport-http\strategies\basic.js
function verified(err, user) {
if (err) { return self.error(err); }
if (!user) { return self.fail(self._challenge()); }
self.success(user);
}
As far as I can tell the self.fail / self.error / self.success functions are implemented in middleware/authenticate.js and they should be defined since the BasicStrategy extend the generic strategy.
I could not find any related error in passport packages so I guess it come from the typing definitions of lb4 application.
Can someone point me the right direction to fix this? Thanks in advance.
DanielChuDC and michaelezehi