The fusion auth client for node has a method for token introspection?
When I make a request, I send a token in a cookie. I would like to know the status of the token and make a refresh if necessary. If I understand correctly, I need to call the POST /oauth2/introspect, but I cannot find this method in the client. If I'm wrong, please give me a more correct method.
dan last edited by
You have a couple of options.
You should be able to use the
validateJWTmethod on the fusionauth node client. That calls this API: https://fusionauth.io/docs/v1/tech/apis/jwt#validate-a-jwt
You can call into
/oauth2/introspect, but you'll have to construct that URL manually, as it isn't currently supported by the client libraries.
Finally, you can also use a jwt package (like this one) to verify the JWT is still valid without communicating with FusionAuth.
Hope this helps.