Hi! I’m using Firebase App Hosting (not classic Hosting) with a custom domain like my.domain.com
.
I’m trying to use signInWithRedirect()
for Google Auth, but when Firebase redirects back to /__/auth/handler
, I get a 404 error on my domain.
That same flow works if I use the default Firebase domain (my-app.firebaseapp.com
), but not with my custom one — even though it’s whitelisted.
I tried adding rewrites for /__/auth/handler
in apphosting.yaml
, but still no luck.
Anyone else facing this? Or know if Firebase App Hosting just doesn’t support this yet?
For now I’ll use signInWithPopup()
instead.
Thanks!
It definitely supports it. I have my app hosted with my own domain.
Its not just whitelisting. You have to go through a process of adding your custom domain through firebase console. You can tell it which provider you are using (like godaddy or ionos or whoever) and it guides you through the steps. You have to add a .txt record into the data for your domain and wait for everything to sync over 24 hours.
Do those steps sound familiar? Have you done all that type of stuff to get your domain recognised in the firebase console and working?
1 Like
Thaks for your response. Yes, I’m using app hosting with custom domain with no problems.
I mean that the problem it’s not in the build or apphosting, it is in auth service with google provider.
When you use google provider, you have two options: with a pop up or with a redirect.
With redirect using custom domain, google auth does not work.
Now, it is working fine with popUp method. But I needed to use it with redirect.