Using Your Own URL as Your OpenID
One of the cooler features of OpenID is delegation. This means, instead of having your OpenID identifier be
it can be
Much easier to remember, right? And it’s really easy to do, too! Here’s how I did it.
First, sign up for an OpenID with the provider of your choice (note that Google, Yahoo, and Microsoft are all OpenID providers now, so you may already have one). I like myopenid.com, so I originally signed up there. My OpenID identifier is codinghorror.myopenid.com.
To enable my domain to act as a delegate to the OpenID provider, I added these two HTML header tags to the homepage of codinghorror.com.
<html>
<head>
<title>Coding Horror</title>
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="openid.server" href="http://www.myopenid.com/server">
<link rel="openid.delegate" href="http://codinghorror.myopenid.com/">
</head>
Then I used our new multiple OpenID feature to tell Stack Overflow about my new OpenID. Here on my user page, I can see that I already have two OpenIDs attached to my account.

In case you’re wondering, the OpenID fields here are only visible because I’m logged in as myself. The OpenID identifiers aren’t normally visible to anyone else.
I want to attach a new OpenID to my account, so I click New Login. Note that I must be logged in first to change my OpenIDs, so I need to be sure I click New Login!

I enter codinghorror.com as my OpenID identifier, then click the Login button (or just press Enter).
When I’m returned to the page, I had a brand new OpenID identifier in my primary slot!

Now I can log in to any OpenID enabled website using codinghorror.com!
One minor technical note: when logging in via the “New Login” link, your alternate OpenID will be filled first, and all subsequent new logins will overwrite your primary OpenID. Use the new “Swap” link to switch them around, so you can overwrite whichever one you want (thanks Stewart Johnson for that suggestion).
Posted by Jeff Atwood on January 4th, 2009
Filed under design
From StackOverflow.com

