We are trying to write an authantication module for our Drupal 8 website. We are using oAuth.io for external authantications (with social media platforms) every other platform works perfectly. But when we try to login with Twitch we get the error:
Notice: Trying to get property of non-object in OAuth_io\RequestObject->me() (line 133 of [root]/vendor/oauth-io/oauth/src/OAuth_io/RequestObject.php)
This is the code in our redirect page:
$oauth = new OAuth();
$oauth->initialize(['oauthApiKey'], ['oauthSecretKey']);
$request_object = $oauth->auth($provider, [
'redirect' => true
]);
$socialDataArray = $request_object->me('email'); [or ->me() -both the same]
This is very urgent. Could you please help?
We are trying to write an authantication module for our Drupal 8 website. We are using oAuth.io for external authantications (with social media platforms) every other platform works perfectly. But when we try to login with Twitch we get the error:
This is the code in our redirect page:
This is very urgent. Could you please help?