views:

378

answers:

2

My personal site defines my OpenID delegate in the HEAD like so:

<meta content="http://claimid.com/nicksergeant/xrds" http-equiv="x-xrds-location" />
<link rel="openid.server" href="http://openid.claimid.com/server" />
<link rel="openid.delegate" href="http://openid.claimid.com/nicksergeant" />

The XRDS location definition is required by Basecamp's OpenID login. I'm not entirely sure why, but it doesn't work without XRDS. Here's where I found that out.

Unfortunately, if you have an XRDS location definition in your HTML, StackOverflow's OpenID login will not work. It will return:

Unable to log in with your OpenID provider:

Couldn't find the OpenID URL in that HTML; is your account enabled?

I've tried to hide the XRDS definition based on the referrer, but unfortunately when Stack requests the page, it sends along no HTTP referrer:

67.199.15.132 - - [06/Jan/2009:12:21:08 -0500] "GET / HTTP/1.1" 200 16071 "-" "-"

My question is why this is happening, and what is the best workaround? I'm not necessarily blaming this on SO.com, but I'd like to understand what's going on, and how to get around it.

Thanks!

+1  A: 

Have you tried to move the meta tag behind the link tags? Maybe SO is a little picky about this...

Hades32
Yup, tried that.
Nick Sergeant
+1  A: 

In your XRDS you have an empty URI for the Service element of priority 3. You may want to remove that, as some OpenID libraries don't adhere strictly to the priority listed.

 <Service priority="3">
  <Type>http://openid.net/signon/1.0&lt;/Type&gt;
  <URI></URI>
  <openid:Delegate></openid:Delegate>
</Service>
null
I don't own the XRDS file, though I can attempt to use a custom one instead. You're saying i should remove ' priority="x"'?
Nick Sergeant
Yes, specifically priority "3". Also you can grab the XRDS that was auto-generated, and host it wherever you like... and swap out the current location for your self-hosted one.
null
Works like a charm. Thanks!
Nick Sergeant