fastify / fastify-jwt

JWT utils for Fastify
MIT License
514 stars 99 forks source link

types: add key option to sign and verify #314

Closed KirillTregubov closed 1 year ago

KirillTregubov commented 1 year ago

Closes #313

Checklist

gurgunday commented 1 year ago

Can you add a test for the type?

KirillTregubov commented 1 year ago

I have added tests to the jwt.test-d.ts file.

Interestingly, while looking around in the codebase, I could not find a justification for the onlyCookie definition on the VerifyOptions type. It is not documented in the README, and onlyCookie does not seem to be used in the verify function inside jwt.js. Please let me know if this is safe to remove.