[Just another user here] You might want to think about decoupling deep decoding into the authorization flow, and instead create and manage your own "session time" within your database. Off of a separate User "info" node, you might put current session information .. set the start time when you detect that the user has logged in (listen for auth changed), and run a separate session time on that time + your "warn" time (to send the user a message before they are logged out), and a "force stop" event, where you would disconnect the user.
That way, you are not at the mercy to changes in the internal "authorization" process that Firebase uses.
On a separate note, you might look at making a feature request to the Firebase team to include a "getSessionTime()" function or a set alarm time that you can listen for directly.
just some thoughts