Thanks to firebase v 3.9.0, my social OAuth is working great in my ionic app. I have one little change I'd like to make. When prompted to login, it says "Sign in to continue to my-real-appname-12345f.firebaseapp.com."
How to I change that to something more user-friendly like, you know, the app's actually name.
To clarify, I am using firebase to handle authentication for both Google and Facebook. The message is the same for both.
Thanks! Wayne
To edit either of your project's names: Click next to the name for either Project name or Public-facing name. Enter a new name. Click Save.
UIDs will never change.
I asked firebase support and got the following reply. Items in italics are my additions.
--
Hi Jayen,
Thank you for reaching out. I'll be happy to assist you.
In order to update firebase-project-id.firebaseapp.com in 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 by Firebase Hosting. You need to point your custom domain to firebase-project-id.firebaseapp.com.
When connecting the custom domain, if you are not hosting your app on firebase, use a new subdomain (e.g. app.yourdomain.com) and do not redirect it. Firebase will prompt you to add an entry on your DNS server and take care of the SSL certificate automatically.
After connecting your custom domain to your Firebase project, you should also follow the steps below:
Replace the project ID with your custom domain. It will look something like: https://yourdomain.com/__/auth/handler
Go to the GCP Console > Select project > API Manager > Credentials > Add the link in #2 to the 'Authorized redirect URIs'
Then ensure to use yourdomain.com as the authDomain in your app's 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.
Regards,
Aye
--
In my case, yourdomain.com is where I host my site, so I used app.yourdomain.com where I needed it.
authDomain: "app.yourdomain.com"
This is what worked for me:
authDomain: "insertyourdomainnamehere.com"
The error lead me to https://console.cloud.google.com/apis/credentials (Google Cloud Platform > APIs & Services > Credentials).
https://insertyourdomainnamehere.com/__/auth/handler
.Then it should work! It should now say "Sign in to continue to yourdomain.com."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With