EDIT
I just need to differentiate between the three types of devices. So that in my application I can send updates to the current user but on his other active devices, if he currently has an active session from any of these other devices!
possible solution
I could just ignore this, since it makes it harder. But that means I always send a push update, even though the user only accesses the application from one device! This does however give me the advantage that the push notifications history will always have a full history of push notifications. Instead of sometimes no push notification since he is only active on one device at the time of the possible push notification (when this notification is thus not needed)
ORIGINAL
So I have an application which has node.js as back-end. Now it's made so that the same server (meaning backend code) is used for:
- browser client
- Android app
- iOS app
Everything is JSON.
Now how do I get to know from which "device" a request originates.
The "type of device" is only checked at boot, after that the "type of device" is stored in the user's session.
Putting a "secret" inside the mobile app binary is not safe (I think).