BricaBox loves OpenID
I spent literally all day hooking up OpenID 1 and 2 (including sreg) support into the new BricaBox. It was exhausting.
We’re using the excellent janrain php-openid library, but for some reason, the coding gods were against me today.
First off, I found and fixed a small glitch or two in the library (now if I could only remember what I fixed) where php-openid would reference a class named PEAR without checking if it was defined first (ah! I remember — add a class_exists() right around line 181 of SQLStore.php).
I also ran into a lot of include path issues, and ended up defining a constant and prefixing every single require_once() with it. Not sure where those were coming from, but it works now.
The trickiest and most rewarding bits were hooking up the OpenID auth flow to our own internal (and very complex) cross-site login system (e.g. log in to a BricaBox at videowheaties.com, and you’re automatically logged in on bricabox.com, too). I’ll write more on that some other time.
Lastly, a small tidbit of forewarning: I found php-openid’s SQL store to be a bitch to get working with Code Igniter, so after a bit of mucking around, I forewent it in lieu of a filesystem store, and so far, so good.