Skip to content

Twitch authentication error #24

@xlith

Description

@xlith

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions