Firebase hosting is useful now just for simple websites but it is also possible and sometimes cheaper to use as frontend for Google Cloud Run. It is a very common usage pattern to simply map your firebase domain name to a another service running on Google cloud.
Firebase has not documented this but firebase will strip all cookies from the incoming request except on. "__session" cookie. This means if your backend is say Spring Boot which uses SESSION cookie by default or PHP or something else, you will not be able to maintain sessions when using firebase hosting.
The quick workaround for this is to either not use Firebase if you care about this a lot OR modify your service to only use __session cookie.
https://www.frontendeng.dev/blog/36-firebase-cookies-sessions
Top comments (0)