trilbymedia / grav-plugin-login-oauth2-extras

Extra providers for Login OAuth2 Plugin
MIT License
7 stars 6 forks source link

Twitch "kraken" API is no longer maintained. #6

Open esanwit opened 2 years ago

esanwit commented 2 years ago

The current Twitch provider depotwarehouse/oauth2-twitch is based on the now defunct Kraken API.

There is a new provider vertisan/oauth2-twitch-helix which should be drop in compatible.

Any chance of getting this included?

KevinConsen commented 2 years ago

I'm dealing with the same issue

rhukster commented 2 years ago

Could you guys try the latest develop branch to see if that works? I don't have a setup for Twitch currently so you probably will know best.

esanwit commented 2 years ago

@rhukster Seems it's not drop in compatible. Even on the same framework.

I had to update the TwitchProvider with the following:

    public function getUserData($user)
    {
        $data_user = [
            'id'         => $user->getId(),
            'login'      => $user->getLogin(),
            'fullname'   => $user->getDisplayName(),
            'email'      => $user->getEmail(),
            'twitch'      => [
                'avatar_url' => $user->getProfileImageUrl(),
                'bio' => $user->getDescription(),
                'type' => $user->getType()
            ]
        ];

        return $data_user;
    }

After that it appears to work

esanwit commented 2 years ago

@rhukster Can you take a look at the above comment :-)

rhukster commented 2 years ago

Pull request please. I have no way to test currently.