I\'ve been tasked to build a web interface for an Android app based on firebase. I\'ve got a handful of endpoints, that interact with the database (Cloud functions). To acce
Sounds like @Chad K is getting you on the right track (cookies and ajax - breakfast of champions... :), though I thought to share my code from my working system (with some 'privacy' things, of course!)
Look for /**** type comments for things you need to set up yourself (you may want to do some other firebase things differently as well - see the docs...)
LOGIN.php page (I found it simpler overall to keep this separate - see notes to learn why....)
Now, on every page you want the user to see (in my case, it all goes through index.php#something - which makes it easier.... :)
Hope this helps. It is from my working system, which includes some extra features I've put in there along the way, but mostly it is directly from firebase so you should be able to follow along well enough.
Seems a much simpler route to take than your original one.