How to handle session at device level instead of browser level in devise?

325 Views Asked by At

I'm using rails devise gem. I want to restrict the user to allow from multiple devices(2), not multiple browsers. Is it possible to handle session at device level? If not is there any way to handle this?

1

There are 1 best solutions below

0
mikwat On

You could use and maybe extend the devise_invalidatable gem. Although not documented, this gem limits the number of sessions per user to 10. This could be modified or parameterized if you were so inclined.