Ionic Framework and Firebase v3 auth error: This domain is not authorized for OAuth operations for your Firebase project

I’m trying to implement facebook/twitter/google+ autentication using Firebase v3 in my Ionic1 app, it works fine in the browser but it gives me this error on real devices (Android/iOS):

This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.

I think the problem is that I need to add my app’s domain in the “OAuth redirect domains” section in Firebase, but I don’t know which is my app’s domain when running on a device.

  • and are blank

Someone knows how to solve this problem?

Here you can find the same question on SO:

Thanks in advance

I am having the same problem. Did you solve it?

I’ve not found a way to whitelist my Ionic app.

As a guy suggested in a StackOverflow response, signInWithCredential works, but you need to get an OAuth token using an OAuth library/plugin like ngCordovaOAuth or cordova-plugin-facebook4/twitter-connect-plugin.

Here’s an example
var credential = firebase.auth. FacebookAuthProvider.credential(YOUR_FACEBOOK_TOKEN) firebase.auth().signInWIthCredential(credential)

I got it to work by updating everything and it no longer warns me about authorization.

Here is the doc to update to the new version completely.


I already updated and using the latest Firebase 3 but I still get that error. Any idea suggestions ?

Library i am using is: 3.0.3 :
I am using the signInWithPopup method.


signInWIthPopup/signInWithRedirect are not supported at the moment.

You should get use a plugin to get the credential and use them to autenticate using signInWithCredential!topic/firebase-talk/mC_MlLNCWnI

@MisterDev Is it possible to share a small snippet on how you’re using signInWithCredential ? Thank you lots !


You can also use:

Hi all,

I guess the issue i’m having is related to this but I’d like to confirm.

When using the signInWIthCredential method the InAppBrowser instance kind of initiates but it quickly closes not finishing the OAuth process.

Is it related to the same issue you guys are having or it might be another one ?

I’m asking this because I’m considering use the same workaround proposed here.


updated sample using AngularFire2 with Ionic2 and Facebook Auth

does it also work with email auth?

yes it does work with email auth

1 Like

You can check my example! :smiley:

Regards, Nicholls

How would this apply to Ionic 2?

Your code was a great reference, however the error is still there, what is the relevant code in the solution that gets rid of it?

The problem seems to be related to the fact that the app running on the android device with the --livereload option uses http to get the page served from the dev computer’s ionic own web/app server (CLI), this causes the message from the Firebase server, when running the app in production mode (from the device and not the dev server, as ionic run without the --livereload option would do) the origin becomes file:// and the problem disappears if you followed the instructions above )

Note: My case is somewhat simpler, since I am not using facebook or google auth at the moment, however if there was a way to remove the error that would be really nice.

it will not work with the live reload flag set. if your issue is something else, please provide additional details.

1 Like