Firebase JWT can be used to connect Flarum users with this extension https://discuss.flarum.org/d/30632-json-web-token-cookie-login
See the README on GitHub for all implementation details. As stated in the README I unfortunately don't have any example code for the Firebase side since this was implemented for a client and their codebase is closed source and specific to their use case. But I think all the required concepts should be described in the README and replicable in any programming language.
As far as I am aware, it's working well for my customer in production.