Saturday, March 26, 2011

OpenID for Firefox4

I created an addon for Firefox4 that learns your OpenIDs when you use them.

The addon then asks you whether it may store the discovered openid (claimed_id) shown here at the identity commons site:

Another thing the addon does is that it allows the site to query the DOM for your preferred openid:

This is the source code of the last page:
<script type="application/javascript">
 function start() {
   try {
    window.openid.getPreferredOpenidProvider(function(preferredOpenidProvider) {
  var p = document.getElementById("id");
  p.textContent = preferredOpenidProvider;

   } catch(e) {alert("exception="+e);}
<form><input type=button value="Start" onClick="start()"></form>
<p id="id">openid</p>

The addon then asks the user for her consent to provide the openid to the site:

Clicking the openid urlbar icon inserts the openid to an appropriate input field on the page. If the addon did not learn an OpenID in the past it opens the OpenID Foundation's "Get An OpenID" page"

Google's openidsamplestore does NOT put an id or name on the input fields making it impossible for the addon to determine the correct input field. Shame on you Google! You can drag the OpenID urlbar icon to the correct field to insert your OpenID into the field.


The addon works on Stackoverflow too:

Get Firefox4 now and please try out this new addon!

No comments: