In OpenID::Store::Memcache#use_nonce, the return value of #use_nonce is based on a regex search for 'STORED' on the result of @cache_client.add(). However when using memcache-client or dalli for the cache client, the return value of #add is a boolean, and #use_nonce will always return false. This will cause an "invalid credentials" failure message during the authentication process.
I'm not sure if this should be changed in the source code, but using
return result == true
return !!(result =~/^STORED/)
in #use_nonce, seems to fix the problem.
This also just bit me. Heroku seems to prefer dalli as the memcache client of choice, which may make this a common stumbling block until fixed.
In the meantime intrepid individuals could wrap their dalli client with a small adapter that translated the return values to what OpenID::Store::Memcache expects.
I'm also happy to make a patch.
The adapter I mentioned: https://gist.github.com/714535
Thank you Phil, I had the same issue deplying with Dalli to Heroku and I think this will help me out.
One year later, still facing the same problem. Thanks this helped.
Closed with ef84bf7