koa-passport icon indicating copy to clipboard operation
koa-passport copied to clipboard

Passing multiple strategies to passport.authenticate()

Open themightychris opened this issue 4 years ago • 1 comments

Passport seems to support multiple strategies being passed in an array to passport.authenticate()

In trying to get this to work with koa-passport though, I've been unable to get subsequent strategies tried after the first fails. I've tried debugging it, and it appears that koa-passport largely implements its own logic for how authenticate flows and makes no attempt to support multiple strategies. Is this an accurate assessment or am I just doing it wrong?

themightychris avatar May 29 '20 16:05 themightychris

The logic koa-passport implements is just a wrapper necessary to integrate it into koa. It ultimately calls the original passport authenticate() method https://github.com/rkusa/koa-passport/blob/master/lib/framework/koa.js#L102.

However, I've personally never used passport in that way, so it is possible that this is a bug.

rkusa avatar May 30 '20 08:05 rkusa