Is the above answer and naming convention valid? It seems I cannot pass any cookie to enable the session cookie named "__session" in the cloud function.
I installed a simple test function with proper firebase rewrite rules:
export const test = functions.https.onRequest((request, response) => { if (request.cookies) { response.status(200).send('cookies: ${request.cookies}'); } else { response.status(200).send('no cookies'); } });
The function is called every time I access https://www.xxxcustomdomainxxx.com/test , but request.cookies is always undefined and therefore cookies are not returned.
For example, the following always returns βno cookiesβ:
curl https://www.xxxcustomdomainxxx.com/test --cookie "__session=testing"
I get the same behavior in the browser, even after verifying that the session cookie called __session was set correctly through my authentication endpoint. Also, the link above ( https://firebase.google.com/docs/hosting/functions#using_cookies ) no longer indicates anything about cookies or naming conventions.
source share