I asked for firebase support and got the following response. The items in italics are my additions.
-
Hi Jayen
Thank you for contacting us. I will be happy to help you.
To update firebase-project-id.firebaseapp.com on the OAuth consent screen, you need a custom domain with Firebase Hosting (Firebase Console> Hosting> Connect Domain). This is because https://firebase-project-id.firebaseapp.com/__/auth/handler is hosted on Firebase Hosting. You must specify your own domain at firebase-project-id.firebaseapp.com.
When connecting a custom domain, if you do not host your application on firebase, use a new subdomain (for example, app.yourdomain.com) and do not redirect it. Firebase will prompt you to add a DNS record and obtain an SSL certificate automatically.
After connecting your user domain to the Firebase project, you must also follow these steps:
Go to the Firebase console> Select a project> Authentication> Login method> Facebook> Copy the URL under "To complete the setup, add this OAuth redirect ORI to the configuration of your Facebook application."
Replace the project ID with your own domain. It will look something like this: https://yourdomain.com/__/auth/handler
- Go to the GCP console> Choose a project> API Manager> Credentials> Add the link in # 2 to the "Authorized Redirect URIs"
Then make sure yourdomain.com is used as authDomain in your application configuration instead of firebase-project-id.firebaseapp.com
firebase.initializeApp({ apiKey: ...., authDomain: 'yourdomain.com', ... });
Let me know if you have any other questions regarding this.
Hello,
Yes
-
In my case, yourdomain.com is the place where I host my site, so I used app.yourdomain.com where I need it.
source share