Integrating with Zend's OpenID
The Zend library requires a storage backend to record and cache some of the information, and it was very easy to implement a custom one for our database layer. There's a bunch of good examples are available on the documentation page (although they were slightly outdated with the current api and did contain sql injection problems..).
The only drawback I saw was that there was a hard dependency on the Zend frameworks' Session system. I didn't want to write an adapter for our own platform, so ended up overriding the 'verify' and '_checkId' methods to simply use PHP's built-in $_SESSION array.
The odd thing was that the changes I made to the OpenId_Consumer class only set stuff in the session, but I didn't find anything that actually retrieved those values.
On a completely off-topic note, I just got my copy of High Performance MySQL, and I'm pretty excited to read it :)