elgg_hybridauth is an authentication tool that allows users to create new Elgg accounts using their social media accounts.
Providers included by default:
Visit http://hybridauth.sourceforge.net/ for more information about HybridAuth library and additional providers that can be added to this distribution.
Application Type is Web Application Your Site or Hostname - click on More options Authorized Redirect URIs - enter the Authentication URL http://SITE-URL/hybridauth/endpoint?hauth.done=Google
Ensure that you have activated APIs corresponding to the Permissions Scopes you have listed in the settings: https://developers.google.com/+/api/oauth#scopes Scopes listed by default will require
Google+
andContacts
API to work
In OAuth User Agreement, update the default scope to your needs. If you are unsure, check r_basicprofile, r_emailaddress, rw_nus and r_network You do not need to fill out redirect URLs
Fill out the project information In Access Scopes, select This app requires access to private user data. Application Domain - enter http://SITE-URL/hybridauth/endpoint?hauth.done=Yahoo Select APIs for private user data access: requires at least one API to be selected (Social Directory, for example)
Set redirect domain to your site domain, i.e. http://SITE-URL/
Since 1.1.1, you can make use of 'hybridauth:authenticate', $provider
plugin hook
to perform some actions, when the user is authenticated with a provider. This might be a good place
to post stuff to user's wall or to grab a profile picture.
Example of how to post to the user's wall that the user Joined the site:
// do stuff when the user is authenticated with one of the providers
elgg_register_plugin_hook_handler('hybridauth:authenticate', 'all', 'elgg_hybridauth_on_authenticate');
function elgg_hybridauth_on_authenticate($hook, $provider, $return, $params) {
$user = elgg_extract('entity', $params);
try {
$ha = new ElggHybridAuth();
$adapter = $ha->getAdapter($provider);
if ($adapter->isUserConnected()) {
$status = $user->name . ' just joined ' . elgg_get_config('sitename') . ' at ' . elgg_get_site_url();
$adapter->setUserStatus($status);
}
} catch (Exception $e) {
// Something is wrong
}
}
For performance reasons, HYBRIDAUTH_PUBLIC_AUTH
is not longer defined.
Call elgg_get_plugin_setting('public_auth', 'elgg_hybridauth')
where needed.
base_url
and debug_file
are no longer set via plugin settings.
They are set dynamically using current installation path and wwwroot.
Due to recent changes in LinkedIn scopes, HybridAuth was producing unreliable results. HA LinkedIn class and LinkedIn wrapper were replaced with custom implementation for the sake of stability. https://developer.linkedin.com/support/developer-program-transition