Skip to content

Commit

Permalink
fix FastifyJWTOptions.secret property type (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
AleF83 authored Aug 3, 2020
1 parent 5a825f0 commit e80fc1d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@ declare module 'fastify' {
}
}

type Secret = jwt.Secret | ((request: fastify.FastifyRequest, reply: fastify.FastifyReply<unknown>, cb: (e: Error | null, secret: string | undefined) => void) => void);

declare interface FastifyJWTOptions {
secret: jwt.Secret | { public: jwt.Secret; private: jwt.Secret };
secret: Secret | { public: Secret; private: Secret };
decode?: jwt.DecodeOptions;
sign?: jwt.SignOptions;
verify?: jwt.VerifyOptions & { extractToken?: (request: fastify.FastifyRequest) => string | void; };
Expand Down

0 comments on commit e80fc1d

Please sign in to comment.