DEV Community

Discussion on: How to share Firebase Authentication across subdomains

 
johncarroll profile image
John Carroll

Did you use firebase hosting to host all the apps of subdomains ?

I did.

please can you just take a look, i ve been stuck in this task for couple of week and i can't find clear insight

I mean, you can read the Firebase docs and do research on the internet as well as I can.

Thread Thread
 
wafae1234 profile image
wafae1234

i read the docs and everything, i hosted my apps in firebase hosting, still the cookie __session is not set in the browser,
i can see the request containing the cookie but not setting it in the browser
please one last question: when you call your cloud function ...cloudfunctions.net/users-signin which generate the cookie ..., do you call it using the google domain url or the custom domain url ?

Thread Thread
 
johncarroll profile image
John Carroll • Edited

In order for the cookie to be set, the function will need to be on the same domain as the client app.

Also, if I remember correctly one of the links in this post directs to a Google Chrome issue where it didn’t show the cookie being set in the browser. Not sure if it’s the same as what you’re experiencing though.