is there a way to only allow login to one device at a time?

I want to force users to only be logged into 1 device (either phone or computer) at a time so that we don't get weird behavior if they switch roles and to be able to reliably detect which type of device they are using.

Or if there is a way to determine which device they are on via LocalDB, I would be happy with that solution also.

@LaurisaPrince Is it ok to know whether or not the current device is a Phone / Tablet / Desktop, or do you want to be able to differentiate for example between two phones for the same user?

@TielmanleRoux I don’t believe we’ll have two phones per user, but I’ve run into issues with people using phone/desktop simultaneously. I’m also trying to solve a data issue on phone specifically.

  1. Yes, there is a Feature Flag (under your app settings) that allows multiple sessions / devices per user. You can switch this off which will then only allow one active device / session per user.
  2. It is also possible to access information about the current device from the journey.device object in your app's JS. For example you can determine if the device is a phone or not and what 'platform' the device is using (Web, Desktop, Android, iOS)
  3. The only thing that I can think of that you would need to store in LocalDB which you don't otherwise have access to would be a session sequence # per device/session per user. (This value would need to get set using a single-instance CC task every time the user logs onto a new device where there isn't an existing entry for it in the LocalDB, and you would need to increment the counter on the user object. This won't be an accurate reflection of the current # of active sessions, but at least this will give you a way of letting each device at least have it's own 'unique' session sequence number)

![feature flags](upload://uvsY9BjjDr1HvUdlvEWuLOiDMom.png)

thanks Tielman, if we implement the feature and they start session offline, what happens when they come on-line, does the system just log them out of the second one?