Skip to content

Commit

Permalink
fix: some passport strategy verify callback arguments length (#2151)
Browse files Browse the repository at this point in the history
  • Loading branch information
czy88840616 committed Jul 25, 2022
1 parent 5db3b9b commit 65c9025
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/passport/src/passport/passport.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ export function PassportStrategy(
}
};

Object.defineProperty(cb, 'length', {
value: this.validate.length + 1,
});

this.strategy = new Strategy(this.getStrategyOptions(), cb);

if (name) {
Expand Down

0 comments on commit 65c9025

Please sign in to comment.