Refresh token JS

Some providers allow for the expiration to be customized, Twitch does not. If you read up on OAuth2, there are some different thoughts on how to handle tokens that expire. Some would say renew before the expiration and some would say otherwise. Depends upon your application, use case, service provider, and performance requirements. In some cases, the refresh token itself may expire before a certain time, and so you must be proactive or force authentication again.