Last updated January 27, 2009. Created on January 27, 2008.
Edited by JohnNoc, mzuther. Log in to edit this page.

If you want to use your own website as OpenID identifier while still using a third-party OpenID provider, you may use a process called delegation. This means that you can log into OpenID websites by using instead of (or something even harder to type or remember).

For this to work, you only have to include so called link relationships to the HTML <head> section of your homepage. For more information, please see Here's how you can accomplish this with Drupal:

  1. Open Administer > Site building > Blocks and click on Add Block to add a new block.
  2. Create the block with the following data:
    • Block description: choose a name for the block like OpenID delegation.
    • Block body: enter the following PHP code and change the href values to the ones given to you by your OpenID provider:
      ('<link rel="openid.server" href="" />');
      drupal_set_html_head('<link rel="openid.delegate" href="" />');

      // add the next two lines if your OpenID Provider supports OpenID 2.0
      drupal_set_html_head('<link rel="openid2.provider" href="" />');
      drupal_set_html_head('<link rel="openid2.local_id" href="" />');
    • Input Format: PHP code

    Then click on Save block.

  3. Open Administer > Site building > Blocks and add the new block OpenID delegation to a region of your page. You could choose header to remind you that this information is added to the "top" of the page, but any region will do.
  4. Press Save blocks and wait for the page to reload. Then check the page source, usually by right clicking somewhere on the page and selecting View Page Source. The page source should start like this:
        <link rel="openid.server" href="" />
        <link rel="openid.delegate" href="" />
  5. Finally, you might want to try and log into a website using OpenID and your new identifier

You may also want to take a look at OpenID URL, a contributed module that allows you to delegate your URL as an OpenID.

Looking for support? Visit the forums, or join #drupal-support in IRC.


flickerfly’s picture

or you could use the openidurl module and not have to mess with code at all.