I am new to firebase , but I managed to develop an app using firebase -email&password authentication This app is for an organization\'s members so there is no sign up on th
I understand I should be using an auth token
That won't work. Whenever a user signs in on a device, they get a new auth token. So the same user being signed in on two devices, will have to different auth tokens.
But they will have the same UID. So I'd actually store the uid and something that identifies the active device in the database.
activeDeviceByUser
:
Then remove that when the user signs out or disconnects.