I have two rails 4 application running on shared parent domain example.com(pdf.example.com and studio.example.com). The applications are deployed on AWS and storing session in shared Memcached.
On a page of studio.example.com, a page of pdf.example.com is loaded in iframe which covers the entire visible area. Now when user interacts with iframe content, session created in studio.example.com should reset in a sense that timeout should not happen in studio.example.com while sitting in pdf.example.com` pages.
The studio.example.com application uses devise for authentication.
Here is the configuration used to store session in memcached in studio.example.com
config/initializers/session_store.rb
Rails.application.config.session_store ActionDispatch::Session::CacheStore, :expire_after => 30.minutes
config/environments/production.rb config/environments/development.rb
config.cache_store = :dalli_store
There are many resources out there(few listed below) addressing this scenario but all of them are using CookieStore. What sort of configuration would be different for CacheStore?
- http://dev.mikamai.com/post/75476602797/sharing-session-between-your-rails-4x-app-and
- http://excid3.com/blog/sharing-a-devise-user-session-across-subdomains-with-rails-3/
- https://robots.thoughtbot.com/how-to-share-a-session-between-sinatra-and-rails
EDIT Exact scenario was discussed here earlier.