Skip to content

Commit

Permalink
Merge pull request #329 from AaronMoat/fix-express-jwt-secret-typing
Browse files Browse the repository at this point in the history
Fix GetVerificationKey typing to include undefined
  • Loading branch information
adamjmcgrath committed Oct 10, 2022
2 parents d8992ad + 51676fc commit 9574b04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.d.ts
Expand Up @@ -71,7 +71,7 @@ declare namespace JwksRsa {
type SecretCallback = (req: Express.Request, payload: any, done: (err: any, secret?: secretType) => void) => void;

/** Types from express-jwt@>=7 */
type GetVerificationKey = (req: Express.Request, token: Jwt | undefined) => Secret | Promise<Secret>;
type GetVerificationKey = (req: Express.Request, token: Jwt | undefined) => Secret | undefined | Promise<Secret | undefined>;

function expressJwtSecret(options: ExpressJwtOptions): SecretCallbackLong|GetVerificationKey;

Expand Down

0 comments on commit 9574b04

Please sign in to comment.