Skip to content

Commit

Permalink
fix: support a secretProvider (#1063)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinranks authored and daffl committed Oct 26, 2018
1 parent 55de15e commit 9da26ad
Show file tree
Hide file tree
Showing 2 changed files with 363 additions and 167 deletions.
3 changes: 2 additions & 1 deletion packages/authentication-jwt/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ function init (options = {}) {

let Verifier = DefaultVerifier;
let strategyOptions = merge({
secretOrKey: jwtSettings.secret,
secretOrKey: typeof jwtSettings.secret !== 'function' ? jwtSettings.secret : null,
secretOrKeyProvider: typeof jwtSettings.secret === 'function' ? jwtSettings.secret : null,
jwtFromRequest: ExtractJwt.fromExtractors(extractors)
}, jwtSettings.jwt, omit(jwtSettings, ['jwt', 'header', 'secret']));

Expand Down
Loading

0 comments on commit 9da26ad

Please sign in to comment.