Skip to content

Instantly share code, notes, and snippets.

@jgyllen
Created October 10, 2012 02:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgyllen/3862855 to your computer and use it in GitHub Desktop.
Save jgyllen/3862855 to your computer and use it in GitHub Desktop.
Sharing Rails cookie session with a Sinatra app
use Rack::Config do |env|
env[ActionDispatch::Cookies::TOKEN_KEY] = 'abc123' # Secret token from Rails config
end
use ActionDispatch::Session::CookieStore, key: '_myapp_session' # Session key from session store options in Rails config
run MyApp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment