-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OAuth token expired event for IRC and TwitchAPI #298
Comments
Do you have an oauth that has expired or sample message that is received on expired oauth? I don't have either so it's hard to test functionality for it. |
twitch docs say: When you make a request with expired or incorrect authorization credentials, the API returns a WWW-Authenticate header (with an invalid_token error) and a 401 Unauthorized status: DELETE /kraken/users/test_user1/follows/channels/test_channel HTTP/1.1 HTTP/1.1 401 Unauthorized { Sadly I dont have any information how the IRC one looks |
"On seeing a 401 error with a WWW-Authenticate header, an application should try to refresh the session if a refresh token is present. " |
Ya, I do think it's a good idea to get some kind of event for the client when using an expired token, and an exception for the API. As for automatically refreshing the token, i don't think that's really possible without providing the twitch app secret + refresh token, which is nasty. |
ye I dont need an auto refresh but sth to detect that I need to make a refresh call inside the lib would be nice |
IRC only prints login failed into the console it seems |
Since the referenced pull request is closed, just an update: This detection is completed for API, still needs to be done for TwitchClient. |
This issue was moved to TwitchLib/TwitchLib.Client#41 |
Hey swiffty,
Is is possible to get an event when the irc login or an api call failed bcs the oauth token that is used is expired?
This would help alot!
Regards
Syzuna
The text was updated successfully, but these errors were encountered: