zorael / kameloso

IRC bot with Twitch support
Boost Software License 1.0
9 stars 3 forks source link

Twitch implicit flow #99

Closed zorael closed 4 years ago

zorael commented 4 years ago

This finally adds proper Twitch authorisation.

What we used to do was to use a third-party site to generate an OAuth key to use as pass and connect with, and we were content. Then we found out about the richr API, and to use it the key has to be paired with the application's client ID.

This adds a captive session that guides the user toward generating a new key that properly works with kameloso (and only kameloso), by authorising it via a Twitch login form on Twitch's own site. It's scary but it's safe. Presently the user has to copy a resulting URL and paste it into the waiting program, but it works.

Not sure it's worth going beyond that; read: create a small web server to automatically catch the URL so the user doesn't have to copy/paste.