Help me add a simple cloud function in my mobile app that is executed whenever a user loses connection to firebase.

Job ID: 32834935

Budget: $20 – $50 USD

I already have a firestore and real time database that is updated whenever a user logs in and logs out. But I need a cloud function to log out a user if that user is disconnected from firebase.
I am using Xamarin.