v3.1.0
Add the ability to pass a function to opts.secret. This function is provided with the decoded header from the JWT. It should return a promise that resolves to the secret to use for verification of the token.
The intended use case for this is to allow the use of JWKS via https://github.com/auth0/node-jwks-rsa.
Thanks to @dunnock for the PR.