DrupalMontreal / 2014.drupalcampmontreal.com

1 stars 0 forks source link

HybridAuth - Twitter application #20

Open pbuyle opened 10 years ago

pbuyle commented 10 years ago

In order to enabled Twitter login on the site (suing the HybridAuth module and library), we need a Twitter application.

This is doable from https://dev.twitter.com/apps.

You must set Callback URL to http://2014.drupalcampmontreal.com/hybridauth/endpoint?hauth.done=Twitter

Then visit http://2014.drupalcampmontreal.com/fr/admin/config/people/hybridauth/provider/Twitter?destination=admin/config/people/hybridauth to add the created application consumer key and secret.

pbuyle commented 10 years ago

Application has been created, but authentication does not work. After returning from Twitter, error message are shown in the log:

2014-07-12 00:56:27Drupal watchdog ded-5779 dcmontreal: http://2014.drupalcampmontreal.com|1405126587|hybridauth|198.48.198.184|http://2014.drupalcampmontreal.com/fr/hybridauth/window/Twitter?destination=%5Bsite%3Aurl%5D&destination_error=node%3Fplo%3D||0||Exception: Authentication failed! Twitter returned an error. 500 Internal Server Error: Something is broken. in Hybrid_Auth::initialize() (line 147 of /mnt/www/html/dcmontreal/docroot/sites/all/libraries/hybridauth/hybridauth/Hybrid/Auth.php).collapse
2014-07-12 00:56:27Drupal watchdog ded-5779 dcmontreal: http://2014.drupalcampmontreal.com|1405126587|php|198.48.198.184|http://2014.drupalcampmontreal.com/hybridauth/endpoint?hauth.done=Twitter&oauth_token=Jg9l0QOCiLXeHZIiVbPdHeKp6rz0cB40GhFBOFgYg&oauth_verifier=UxyZ5kvfh4NwbD8a6AKUNTHhme15kNteOUf5rx6alYM||0||Notice: Undefined index: oauth_token_secret in OAuth1Client->accessToken() (line 105 of /mnt/www/html/dcmontreal/docroot/sites/all/libraries/hybridauth/hybridauth/Hybrid/thirdparty/OAuth/OAuth1Client.php).collapse
2014-07-12 00:56:27Drupal watchdog ded-5779 dcmontreal: http://2014.drupalcampmontreal.com|1405126587|php|198.48.198.184|http://2014.drupalcampmontreal.com/hybridauth/endpoint?hauth.done=Twitter&oauth_token=Jg9l0QOCiLXeHZIiVbPdHeKp6rz0cB40GhFBOFgYg&oauth_verifier=UxyZ5kvfh4NwbD8a6AKUNTHhme15kNteOUf5rx6alYM||0||Notice: Undefined index: oauth_token in OAuth1Client->accessToken() (line 105 of /mnt/www/html/dcmontreal/docroot/sites/all/libraries/hybridauth/hybridauth/Hybrid/thirdparty/OAuth/OAuth1Client.php).