Prerequisites
Fastify version
5.2.1
Plugin version
8.1.2
Node.js version
22.13.1
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
15.3.1
Description
👋 As the README notes, when working with Twitch, one has to set tokenRequestParams in the plugin options to allow OAuth to work correctly.
However, the refresh method exposed on a returned token does not make use of tokenRequestParams, so one has to pass them in manually again.
Similarly, the getNewAccessTokenUsingRefreshToken method exposed on the plugin instance itself does not make use of tokenRequestParams.
Link to code that reproduces the bug
https://gist.github.com/MattIPv4/816c5692f822c5a18aaa11d37d7b5536
Expected Behavior
If tokenRequestParams is provided, it should be passed in automatically for all the token requests.
Prerequisites
Fastify version
5.2.1
Plugin version
8.1.2
Node.js version
22.13.1
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
15.3.1
Description
👋 As the README notes, when working with Twitch, one has to set
tokenRequestParamsin the plugin options to allow OAuth to work correctly.However, the
refreshmethod exposed on a returned token does not make use oftokenRequestParams, so one has to pass them in manually again.Similarly, the
getNewAccessTokenUsingRefreshTokenmethod exposed on the plugin instance itself does not make use oftokenRequestParams.Link to code that reproduces the bug
https://gist.github.com/MattIPv4/816c5692f822c5a18aaa11d37d7b5536
Expected Behavior
If
tokenRequestParamsis provided, it should be passed in automatically for all the token requests.