glacials / splits-io

a speedrunning data store and analysis engine
https://splits.io
GNU Affero General Public License v3.0
133 stars 27 forks source link

Add webhook for Twitch auth revocation #736

Open glacials opened 3 years ago

glacials commented 3 years ago

When a Twitch user revokes access for Splits.io to use their Twitch account from the Twitch side (i.e. not using the Splits.io settings page), we currently aren't informed about this and so will keep trying to use their Twitch access tokens / refresh tokens to do things like sync follows and crawl highlights when asked.

Twitch now supports a webhook that notifies us when such a disconnect happens, so we can use this to remove the connection on our end.

As part of this, consider the possibility that that Twitch link is the only login method the user has to Splits.io, and what (if anything) we should do in that circumstance to not brick their account.