intridea/omniauth — pull request #735 by ninjapanzer (2014-04-10 01:16:48+00:00)
Title: Abstracting the session storage mechanism

### What am I

We had a condition at ThinkThroughMath where an incoming request to the request phase included a rather large set of request params. This was causing a cookie overflow to occur. We do not want to incur the overhead of moving away from our cookie session_store. So I abstracted the session process in OmniAuth to accept a storage adapter. I have added the rack.session process back as the SessionStore adapter and create on for redis here https://github.com/ninjapanzer/omniauth-redis-store which hooks into the config process to allow me to define the redis client I want to use. After requiring the adapter config looks a little like this:

require 'omniauth-redis-store'

OmniAuth.config.request_store = OmniAuth::RedisStore
OmniAuth.config.redis = Redis::Namespace.new('OmniAuth', :redis => REDIS)

### The adapter spec

Adapters implement a Hash like interface with [], []=, and delete methods

I also moved the session method out of the strategy and into the concern of the storage adapter