If you have a self-hosted blog, meaning that you have the access to the files on the server, then implementing OpenID might be the greatest way to help your readers and yourself.
If you haven’t heard about the OpenID before, then in a nutshell it is your universal login name, which you can use to authenticate yourself on other blogs and websites without ever filling out those registration forms again. The illustration below shows how it works:
There are only three components involved: you and your OpenID indentifier which you have set up on your own OpenID Provider server.
However, keep in mind that in case you don’t have the access to a web server, you can still create an OpenID identifier at any of the Identity Providers such as Flickr, Blogger or Yahoo. You might even have one if you blog at WordPress.com. I strongly suggest that you read this excellent explanatory article by Sam Ruby to get a sense of how OpenID can work for you.
In this article I will show you how to:
- install a single user OpenID Identity Provider called phpMyID on your web server,
- configure your blog so that it’s URL is your OpenID identifier, and
- enable OpenID authentication on your blog, so that readers can use their OpenIDs to leave comments.
If you already have an OpenID account at one of the Identity Providers and you simply want be able to use your blog’s URL for authentication, skip the phpMyID installation part and go directly to step 3.
You will need:
- a blog powered by WordPress.
- a single user Identity Provider software called phpMyID developed by CJ Siege Niemira,
- WP-Yadis plugin created by Will Norris, to make the blog’s URL as your OpenID, and
- WP-OpenID plugin developed by Will Norris, Alan J Castonguay and Chris Messina to enable OpenID authentication for the blog.
Installation Guidelines
These instructions contain only the main points you should follow. If you want to have something configured differently than I have suggested, then feel free to do it.
- Download phpMyID and extract it somewhere on your computer. Notice that there are only two
.php
files and one.htaccess
file to get things working. - Read through the
README
file that is in the same package which you just extracted. - Decide the URL you would like to use for the phpMyID identity provider. I am using
konstruktors.com/id
. Notice that this URL is used for placing the Identity Server only, and you will be still able to have the blog’s URL for authentication (after installing the WP-Yadis plugin). - Edit and complete the
MyID.config.php
file as described inREADME
and then renameMyID.config.php
toindex.php
just before uploading it to the server. This way you’ll be able to useyourblogsurl.com/id
instead ofyourblogsurl.com/id/MyID.config.php
in future. - Go to the URL you chose previously and see if it works. If it doesn’t, try reading through the
README
file again a few times or download a fresh copy of phpMyID and start over. It should work. Move on to the next steps once you have got it working. - You could use this URL for authenticating on any of the OpenID enable websites, but we want the blog’s URL, so let’s continue.
- Download WP-Yadis plugin, unzip it, upload it to the plugin folder of your WordPress installation, activate it, go to WordPress Settings and click on ‘Yadis’ in the menu.
- Let’s add the details for the Indentity Server we created in the previous step. Select Other in the drop-down menu. Username is the one you chose (
'auth_username' => '...'
) when editingMyID.config.php
file. Mine is kaspars. For OpenID Server enter the URL of your Identity Serverhttp://yourblogsurl.com/id/
and for OpenID Delegate enterhttp://yourblogsurl.com/id/index.php
- Now you should be able to use your blog’s URL (
http://
yourblogsurl
.com/blog
) as your OpenID. Test it at openidenabled.com/resources/openid-test/diagnose-server. You should see ‘OK’ if everything is working correctly. - Download WP-OpenID* plugin, extract it, upload it to the WordPress plugin folder, activate it and you should now see an OpenID icon in the background of the ‘Website’ input field in the comment form (when you are logged out). If you would also like to use OpenID for logging into the administration panel of your blog, go to ‘Users’ > ‘Your Identity URLs’ and add the URL of the Identification Server
http://yourblogsurl.com/id/index.php
.
Thats All. You now have a complete control over your identity on the Web, and your blog’s URL together with your name and e-mail address will be used automatically when leaving comments on other websites.
Notes & Known Problems
* Currently I am not using the WP-OpenID plugin because the JavaScript it uses for adding the input field’s background image seems to produce errors, but it might work well for you. I have got it working by simply removing the jquery.xpath.js
file from the files
directory inside the openid
folder. It seems that the XPath compatibility provided by this file is now built into the jQuery core.
Therefore you can now test your OpenID by leaving a comment on this article.
If you experience any errors or problems, be sure to search through the WordPress Support forum and also consult the Google.
Great that I found a way to solve the JavaScript issues — its so much more convenient to use OpenID instead of name, URL and email separately.
Thanks Kaspars, very nice article.
I followed the steps, using both wordpress and myopenid, but some sites just won’t recognise my openid.
The check in step 9. fails as well.
and on some sites it just works, I’m really confused and wondering what the problem could be.
Julian,
oh boy, it’s working on this site, dunno. It’s getting stranger every time…
Julian, it seems that it’s all working fine here, so it must the problem on their end not yours. Also, don’t forget to add the
http://
part if the login fails without it.Nice article. I think it got mine working, but, that’s why I’m leaving this comment!
Are you still able to get Open ID to work? I see you’ve removed it from your site.
Yeah, I have removed the OpenID server from the site since I was not using it that much. Also the client part is gone because the plugin was causing too many issues with people not being able to leave comments although their URL was not an OpenID endpoint.