-
-
Notifications
You must be signed in to change notification settings - Fork 144
feat(auth): update Twitch OAuth to use Helix API #1899
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
base: 3.x
Are you sure you want to change the base?
Conversation
|
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
left a comment
There was a problem hiding this 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!
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? |
Good thinking, though I think we could implement a mapping from the enum here. Could you look at that?
Haha maybe. I don't think we should abide by the PHP League's naming though. We have our own wrappers :)
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! |
…neration to use the enum name instead of class
|
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? |
…neration to use the enum name instead of class
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)
I've run composer qa successfully, and also performed a test of the method in an app I'm writing.