August 26, 2010

Using OpenID with Drupal

One of the concerns that many website administrators managing member-based websites have is losing potential new members during the registration process.  All too often, registration is a tedious and lengthy process for users that is bound to send some percentage of them away from the site, never to sign-up again.  Other times, users get frustrated when they are forced to create a new registration profile for each website they’d like to be a member of.

Enter OpenID.  OpenID is a decentralized and open standard for authenticating users, allowing them to log on to different websites and services using a single login.  As with many 3rd party services, there is a Drupal OpenID module available for use:  http://drupal.org/project/openidurl

The workflow of a new user registration process for a Drupal OpenID implementation looks like this:

  1. The OpenID Drupal module will add a ‘Log in using OpenID’ link to the user login form
  2. If the user already has an OpenID, they can then enter their ID in the form and click ‘Login’
  3. The Drupal website will communicate with the OpenID server and ask it to verify the user
    1. If the user is already logged into the OpenID server then access to the Drupal site will be granted, and OpenID will send the users username and email address to Drupal for auto-registration
    2. Otherwise, the user will be prompted to enter their password and will be verified on OpenID

On its own, the OpenID URL module only sends back a username and email address.  Often times though, additional profile information is required by a website.  In this case, the OpenID Content Profile Field module (http://drupal.org/project/openid_cp_field) comes in handy.  This module maps OpenID user fields to Drupal user profile fields, allowing for additional information from the user to be collected during the auto-registration process.

Once a user is signed up, they then become a regular Drupal user and will be granted permissions based on the Drupal settings for their user role.  While OpenID has been around for a number of years, it is still not implemented as often as it could be.  This may be due partly to the added complexity of integrating with OpenID from within the many Content Management Systems available and the added overhead that this entails for a project.  However, thanks to some handy Drupal Modules, this integration has become relatively straightforward to implement.

Contact New Signature to see what our creative technology can do for you.

Comments are closed.