When a device (tested on iOS) is left with the app open for a long time, and the phone auto locks, the onDisconnectOperation does not trigger on the database. I suspect this is because the token expires before the user goes offline. Is there a way to make the security rules allow this?
I have already tried setting security rules to
".write" : true
for the node that keeps track of the connected status of the user.