ruby on rails - Is Devise gem support for single user login? -


a user named 'user1' signed in @ compter a. in computer b, account 'user1' can't sign in, user1 must logout, user1 can sign in on computer b.

is devise support this?

you can add column users table, indicate if user logged in or no. set true when user logs in, , false when logs out. on user login check column if false, login user, otherwise show notification else using account.

to avoid situation when user closes tab without logging off, make rake task logout user after time

upd: @arjan said, dont need rake task, can use devise's module this


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -