Skip to content

Conversation

@iamdadmin
Copy link

composer.json included library depotwarehouse/oauth2-twitch for OAuth with Twitch.

This library uses the Twitch Kraken API, which is no longer available, as of 2022 (source)

  1. Removed this 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

I've run composer qa successfully, and also performed a test of the method in an app I'm writing.

@iamdadmin
Copy link
Author

This is the first time I've contributed ... to actually just about any project. So while I read the guidelines, errors may remain and I apologise in advance!

@innocenzi innocenzi changed the title feat(auth): Remove deprecated Twitch OAuth library and fully implement feat(auth): update Twitch OAuth to use Helix API Jan 19, 2026
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.

I'd prefer if the terminology was just "Twitch" instead of "Twitch Helix". It's the default API, the previous one is completely decommissioned, so there should not be any confusion

Other than that and the failing test, LGTM!

@iamdadmin
Copy link
Author

iamdadmin commented Jan 19, 2026

I'd prefer if the terminology was just "Twitch" instead of "Twitch Helix". It's the default API, the previous one is completely decommissioned, so there should not be any confusion

Other than that and the failing test, LGTM!

I did go with just Twitch, but as the name of the library internally is TwitchHelix, the installer detected that and put it in the Stub publishing anyway. Not wanting to get hacky, I followed that naming instead.

I am happy to (and would prefer) to move to Twitch if you want me to push harder?

The complicating thing is that ThePHPLeague OAuth website lists both, the old one as Twitch and the new as TwitchHelix, and no-one has deprecated the old one in over three years! It still points at old API endpoints that don’t exist now so I guess no-one wants to login with Twitch?

Let me know what you’d like me to do about the name :)

The failing test seemed to be in View, and I didn’t touch that so hopefully not related?

@innocenzi
Copy link
Member

Not wanting to get hacky, I followed that naming instead.

Good thinking, though I think we could implement a mapping from the enum here. Could you look at that?

The complicating thing is that ThePHPLeague OAuth website lists both, the old one as Twitch and the new as TwitchHelix, and no-one has deprecated the old one in over three years! It still points at old API endpoints that don’t exist now so I guess no-one wants to login with Twitch?

Haha maybe. I don't think we should abide by the PHP League's naming though. We have our own wrappers :)

The failing test seemed to be in View, and I didn’t touch that so hopefully not related?

There does appear to be a failure in the test related to the env: https://github.com/tempestphp/tempest-framework/actions/runs/21143505972/job/60803292406?pr=1899#step:13:203

I haven't worked on the installer so not sure what's wrong. If you think that's a bug elsewhere, let me know and I'll take a look!

@iamdadmin
Copy link
Author

Not wanting to get hacky, I followed that naming instead.

Good thinking, though I think we could implement a mapping from the enum here. Could you look at that?

The complicating thing is that ThePHPLeague OAuth website lists both, the old one as Twitch and the new as TwitchHelix, and no-one has deprecated the old one in over three years! It still points at old API endpoints that don’t exist now so I guess no-one wants to login with Twitch?

Haha maybe. I don't think we should abide by the PHP League's naming though. We have our own wrappers :)

The failing test seemed to be in View, and I didn’t touch that so hopefully not related?

There does appear to be a failure in the test related to the env: https://github.com/tempestphp/tempest-framework/actions/runs/21143505972/job/60803292406?pr=1899#step:13:203

I haven't worked on the installer so not sure what's wrong. If you think that's a bug elsewhere, let me know and I'll take a look!

No worries on both, I will look to have the stub pull from the enum for naming and align to Twitch, and yeah I see the fail now, looking at the runs from mobile is a massive pain. Will probably be tomorrow but either way will update when it’s done!

@iamdadmin
Copy link
Author

The auth tests are passing now. Looks like the database tests are failing and giving error "FiberError: Cannot resume a fiber that is not suspended"; the same errors didn't occur when I ran the phpunit test suite locally, and it looks more like it's an issue with the CI runner when trying to execute the test?

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