Ï--- layout: post title: OpenID - a generic implementation date: 2011-06-03 09:16:59.000000000 +01:00 categories: [] tags: - Javascript - Login systems - OpenID - PHP status: publish type: post published: true meta: _edit_last: '1' comments: true ---
OpenID is a powerful idea: you only need one username and password to access all the different websites you use. For an idea of how it works see this video from myvidoop (an OpenID provider):
So from a user point of view it's nice and simple, and with companies like google, yahoo, AOL and others supporting it, many people already have an OpenID without even knowing it. And from a web developer point of view you don't have to worry about making a secure up-to-date login system as the OpenID providers do that for you.
The challenge for a website then is to make it easy for people who've never encountered OpenID to login. There are some nice graphical systems out there (the most popular being openid-selector), however I prefer this system from Jarrett Vance, it's more lightweight, far more hackable (in the good way), has a natural and clever non-javascript fall-back and it's easy to plug into any OpenID verification system you like.
Combining this with the LightOpenID PHP verification system and a bit of PHP sessions, gives the following generic login system:
Which you can have a go with here.