Ensure single session per user at a time

Thank you in advance to anyone that can help me solve this one!

I would like to ensure that each user authenticated with restful-auth.
has only a single session at a time. If a user has a session open on
computer A, I want the next place that user logs in (computer B) to
kill/destroy/remove the computer A’s session - for Example. (Same
situation with multiple browsers on a single computer.) This way I can
make sure that each company account has many users with their OWN user
account. (Company has many users - user belongs to company) I don’t
want to force the new log in to be restricted until old session has been
destroyed or expired, I rather just kill the first session and allow the
new login on through.

I am using restful-auth (technoweenie) and active_record_session store.
I have tried using logged_in? call and other conditional statements but
nothing seems to work.

Please let me know if anyone has any ideas, if there are any solutions
already and any help!

Thank you,


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs