I have a simple Ruby on rails application that I want to integrate with an existing php website. I only want that users who\'s been authenticated by the php application woul
The most common way to keep a user logged in is to store something like current_user_id:777
in the user's session. Therefore, the easyest way is to share the session between the Rails app and the PHP app. Then, you must use the same convention to store the identity of a logged in user.
A way to do this is to use memcached as the session support.
Problems with this approach: you could set/read the same session variable in the same time from both apps (but it can be avoided).
References:
Storing your php sessions using memcached
Usind memcache as rails session store