I'd recommend JanRain's library, they say its used by 80% of all OpenID enabled users, (possibly, it was one of the earliest ones), but you can also use them for OpenID authentication as a service provider using their RPX service, or just get them to do all the work for you via their myOpenID domain tool.