Skip to content

Conversation

@iamdadmin
Copy link

(Replaces broken PR 1899...)

Prior to this PR, composer.json included library depotwarehouse/oauth2-twitch for OAuth with Twitch, but it did not have a wrapper.

However this library uses the Twitch Kraken API, which is no longer available, as of 2022 (source) - PHPLeague also need to deprecate the package, I'll let them know to remove it.

  1. Removed the old provider and selected the replacement TwitchHelix wrapper from ThePHPLeague vertisan/oauth2-twitch-helix
  2. Added this to the installer and stubs
  3. Implemented the wrapper for TwitchHelix in the auth package
  4. Updated documentation
  5. Updated the authinstaller test
  6. Created an Enum to provide the canonical name of the providers to keep naming conventions consistent throughout

@iamdadmin iamdadmin changed the title feat(auth): Implement Twitch OAuth provider wrapper feat(auth): implement Twitch OAuth provider wrapper Jan 26, 2026
@iamdadmin
Copy link
Author

That one was an utter nightmare to chase down, I had to xdebug and step in the code. Turns out, changing the installer to handle outputting 'Twitch' instead of 'TwitchHelix' also broke the null -> 'generic' default case, so I had to put 'Generic' specifically in SupportedOAuthProvider->getName() for the self::GENERIC case.

The tests pass locally. But I can see it complaining about rate-limiting from docker in the integration test on GH actions so that's fun.

Copy link
Member

@innocenzi innocenzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking time to fix the CI 🙏 just a minor change before merging

iamdadmin and others added 2 commits January 27, 2026 10:41
Co-authored-by: Enzo Innocenzi <enzo@innocenzi.dev>
Co-authored-by: Enzo Innocenzi <enzo@innocenzi.dev>
@iamdadmin
Copy link
Author

Thanks for taking time to fix the CI 🙏 just a minor change before merging

No worries, makes sense, so have committed both. Another test run is on it's way!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants