Teekeks / pyTwitchAPI

A Python 3.7 compatible implementation of the Twitch API, EventSub, PubSub and Chat
https://pytwitchapi.dev
MIT License
254 stars 38 forks source link

set_user_authentication should attempt to refresh token if auth fails #221

Closed adhawkins closed 1 year ago

adhawkins commented 1 year ago

It appears that currently set_user_authentication will just fail if passed tokens that have expired.

Given that it is passed the refresh token as well, it would be good if it attempted a refresh of the token once if the initial authentication fails (and signals the user_auth_refresh_callback if one is set)