Add documentation about changes in fastify.jwt object while using namespaces
Prerequisites
- [X] I have written a descriptive issue title
- [X] I have searched existing issues to ensure the issue has not already been raised
Issue
Hello, I was using fastify-jwt to implement a authorization strategy with accessToken and refreshToken using the namespace feature.
But when I had to use the functionality of fastify.jwt instead of the default function <namespace>JwtVerify or <namespace>JwtSign defined in the documentation, there wasn't any information about the changes that are applied to fastify.jwt when you use namespaces.
Thanks for reporting! Would you like to send a Pull Request to address this issue?
The documentation has been updated along with #297. It may cover your issue
I suppose it would be good to know about how to use .jwtVerify() with namespaces, because all of the .{namespace}JwtVerify functions require token: string, contrary to the default function (They are bound to FastifyInstance, instead of FastifyRequest, as well). It is also unclear on how to use it with cookies, for example.
I can set up a new Issue if this is not an intended behavior.