Forum Moderators: phranque

Message Too Old, No Replies

Why OpenID won't catch on

         

httpwebwitch

2:23 am on Dec 29, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



OpenID: a fantastic idea, founded on sound practices, bravely adopted by some prominent partners...
but right now I'm tempted to call it a load of rubbish.

I'm trying to implement OpenID on my site using PHP5, and none of the code libraries work. Unzip the sample libraries, run them demo, and all I get is cryptic (undescriptive and undocumented) error messages. Some of these libraries I've tried are incompatible with the latest release of OpenID itself (version 2).

Most of them are merely variations on the same chunk of code, and require the installation of horrid PEAR libraries.

Nowhere does OpenID really explain how OpenID works

The specifications are ridiculously obtuse

Documentation is among the worst I've ever suffered

How can this possibly catch on if it's so difficult to implement?

They should take a few lessons from reCaptcha, a similarly complex system, but which comes with code that really works, and documentation that a normal human can read and use. The first time I set up a reCaptcha, it took 20 minutes. I've been struggling with OpenID for nearly 5 hours, and right now all I have is a pile of unusable spaghetti code.

Is it just me?

g1smd

2:29 am on Dec 29, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Are you sure you have the right version of PHP etc installed? That can be a pain sometimes. I find the instructions for many open source things to be severely lacking. I gave up with PHPmyAdmin because there were too many steps missing from the instructions and too many obtuse error messages. Never did get it to work. Looks like I'll now be avoiding OpenID until I see people talking about it much more favourably.

httpwebwitch

2:54 am on Dec 29, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a pretty standard PHP5 installation... and modesty aside, I'm not a newb struggling with the language, but I really don't feel like debugging and troubleshooting someone else's work to get this running.

PHPmyadmin is cool if you get it installed right, but it's no cakewalk getting it running. I much prefer other tools for administering mySQL anyways.

httpwebwitch

3:40 am on Dec 29, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I finally got all the require_once() commands connected, since those were all hooked up wrong. I got the form actions directed properly (they were wrong too), and the authentication went through. Then when redirected back to my site I was greeted with this:

Fatal error: current_url must be a string; see NEWS file for upgrading notes. in /public_html/***/openid/Auth/OpenID/Consumer.php on line 417

the NEWS file says that in order for the library to work, I need to change the params being passed to "Auth_OpenID_Consumer::complete()". to wit:

$return_to, a required string that is the return URL passed to Auth_OpenID_AuthRequest::redirectURL()

Maybe this is pointing out the obvious (one of my special skills), but rewriting the arguments of functions embedded deep within strangely named classes is not a walk in the park, certainly outside the comfort zone of most developers, and definitely beyond the annoyance theshold of the rest.

My plan was to get OpenID set up first, then add Facebook Connect, Yahoo auth, and Google signin after that.

I think I'm going to scrap OpenID and move on

httpwebwitch

3:53 pm on Dec 29, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



(12 hours later)
tenacity rules.

I slept on it for a while, then got back to it early this morning. I did need to tweak some stuff in the library, then gradually got everything working. What a pain!

So in summary,
1) OpenID is a very cool pile of technology
2) if it's working, it works quite well
3) is it's not working, it is NOT easy to set up

some tips:
1) get the latest latest latest version of the JanRain library
2) get a 2nd package called "EasyOpenId" (link avail. at [openid.net...]
3) create a folder off your root called "openid" and move the "Auth" folder as a child of that
4) on the server, all you need is the "Auth" and the 3 handler files in EasyOpenId. they go in the "/openid" folder, one level above Auth
5) when you get the "$return_to is not a string" error, the problem is that you're passing in the whole $_GET array, when really it wants $_GET['openid_return_to']. that's on line 78 of EasyOpenId.php
6) $response->extensionResponse() expects 2 params. on line 40 of finishauth.php -> change it to "$sreg = $response->extensionResponse('sreg',true);"
7) when the user logs in successfully, the browser gets sent back to finishauth.php, with a querystring full of goodies. The OpenID is $_GET['openid_identity']. Check if that var exists in the querystring and redirect from there