Login form with HybridAuth widget
HybridAuth settings
HybridAuth identities management
HybridAuth tokens
HybridAuth required fields

HybridAuth Social Login integrates HybridAuth library into Drupal and allows your users to login and register using:

  • Facebook
  • Twitter
  • LinkedIn
  • Google
  • Yahoo
  • Windows Live
  • Foursquare
  • AOL
  • OpenID
  • Github, LastFM, PayPal, Vimeo, Disqus, Instagram, Tumblr, Vkontakte, Mail.ru, Yandex, Odnoklassniki, Twitch.tv, Steam and more

Demos

Production sites

Tutorials

Advantages

  • Doesn't depend on any external service
  • Doesn't load any external CSS or JS files - blazingly fast widget rendering
  • Relies on third-party open source PHP library HybridAuth (provides communication with authentication providers; no need to support them in the module code) developed and supported on GitHub by broad community of contributors

Features

  • New element - hybridauth_widget - to use in any form or renderable array:
    if (module_exists('hybridauth') && !user_is_logged_in()) {
      $element['#type'] = 'hybridauth_widget';
      print drupal_render($element);
    }
  • Default widget settings and account creation options are configurable through UI
  • Selectable forms (user login form, user login block, user registration form, comment form) to add default HybridAuth widget to
  • Connect several social identities to one account and login using any of them
  • Login through modal window - integration with Colorbox, fancyBox, Shadowbox and Lightbox 2
  • Token integration - tokens are provided for user account created by HybridAuth to use with Realname and Rules
  • Rules integration - events on user creation/login; adding and deleting HybridAuth identity; different actions to help with saving data to fields
  • Pluggable icon packs as Ctools plugins - any module or theme can define its own icon pack
  • E-mail addresses verification - if authentication provider doesn't provide verified e-mail address or user enters it manually then e-mail confirmation workflow is triggered
  • Required information - you can choose the required information (First name, Last name, E-mail, Gender) and if authentication provider doesn't return them the user will need to fill them in before the registration continues
  • Allow users to change their username before registration + integration with Username originality AJAX check or Friendly Register
  • Suggest users to choose their roles when registering
  • Options to remove username and password fields from user profile edit form - these fields are not relevant for users created by HybridAuth
  • Written in compliance with Drupal coding standards

Installation

  • Download version 2 of HybridAuth library and unpack it into "sites/all/libraries/hybridauth" folder; for recent library versions you also need to install composer dependencies - either execute composer install in the library directory or use composer dependency management approach suitable for your project
  • Download and install (if not installed yet) the Chaos tool suite module
  • Download and install this module; don't forget to assign permissions to use HybridAuth

Social networks API

Persistent sessions were implemented in 7.x-2.4 and here is an example on how you can use the API.
To do smth like this Twitter post:

if ($hybridauth = hybridauth_get_instance()) {
  try {
    if ($hybridauth->isConnectedWith('Twitter')) {
      $adapter = $hybridauth->getAdapter('Twitter');
      $adapter->setUserStatus('Testing out posting from HybridAuth #spam #test /cc @hybridauth');
    }
  }
  catch (Exception $e) {
    watchdog_exception('hybridauth', $e);
  }
}

Additional providers plugins

uLogin to HybridAuth migration

  • Disable "uLogin" module (IMPORTANT: do not uninstall it)
  • Enable "HybridAuth" and "HybridAuth uLogin" modules
  • Go to "admin/config/people/hybridauth/ulogin" and process the identities
  • Disable "HybridAuth uLogin" module
  • After that you can uninstall "uLogin" module

Required fields

If your site requires some user profile fields that can't be filled using Rules and data from authentication providers then you might want to use the Complete profile, Profile Fields Force Filling or Profile Enforcer module.

Similar modules (mostly external services based)

Credits

  • 7.x-2.x branch was sponsored by StartupTurbo
  • 6.x-2.x branch was sponsored by Forbes.ru
  • ESIA provider plugin was sponsored by PAFES

Special providers

The module provides plugin for ESIA. You also need the provider implementation file for the HybridAuth library - https://github.com/duozersk/hybridauth/blob/ESIA/additional-providers/hy...
Модуль предоставляет плагин для ЕСИА - "Единая государственная Система Идентификации и Аутентификации" портала Государственных услуг России. Также необходимо добавить файл реализации провайдера в саму библиотеку HybridAuth - https://github.com/duozersk/hybridauth/blob/ESIA/additional-providers/hy...
Плагин разработан в рамках взаимодействия сервиса САИWiFi компании PAFES.

Project information

Releases