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

13,211 views
Skip to first unread message

Jorge Coello

unread,
May 25, 2016, 2:15:13 PM5/25/16
to Firebase Google Group
I am having this issue "This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console." in my cordova app, could you guys help me about...

Jacob Wenger

unread,
May 25, 2016, 9:44:25 PM5/25/16
to Firebase Google Group
Hey Jorge, make sure the domain you are using is listed in the OAuth redirect domains section here: https://console.firebase.google.com/project/<PROJECT_ID>/authentication/providers

Phạm Xuân An

unread,
May 26, 2016, 10:23:35 AM5/26/16
to Firebase Google Group
Hi Jacob, i've same issue. What domain for "cordova app" ?

Vào 08:44:25 UTC+7 Thứ Năm, ngày 26 tháng 5 năm 2016, Jacob Wenger đã viết:

boj...@google.com

unread,
May 26, 2016, 12:05:36 PM5/26/16
to Firebase Google Group
Currently sign in with popup and redirect are not supported for Cordova app. So the error is safe to ignore.

Harpreet Mann

unread,
May 27, 2016, 4:25:19 PM5/27/16
to Firebase Google Group
Hello,

I am having the same issue. To get a better understanding of firebase I have followed along the 'build a chat' tutorial on the firebase homepage, and I continue to get the same error, and the google sign in does not pop up. Any help would be appreciated. Thank you!

>>firebase.js:75 Uncaught Error: This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.<<

boj...@google.com

unread,
May 27, 2016, 5:40:10 PM5/27/16
to Firebase Google Group
If you are building in a Cordova app, sign in with popup will not work. So ignore the error in the console and simply use signInWithCredential.
Otherwise if you are building for web, you have to whitelist your domain (your app domain where your web app runs or test domain) in the Firebase console.
If you have migrated from Firebase V2, we have had issues there and are currently being fixed.

Tony Awad

unread,
Jun 4, 2016, 2:23:24 AM6/4/16
to Firebase Google Group
SignInWithCredential is throwing "OperationTimeout" from Android.

Are you guys having issues with your auth service?

Here's my code:
this.appData.mainApp.auth().signInWithRedirect(this.appData.providerGoogle);
this.appData.mainApp.auth().getRedirectResult().then((result)=> {
alert('success !!!!');
if (result.credential) {
var token = result.credential.accessToken;
console.log(token);
}
// The signed-in user info.
var user = result.user;
}).catch((error)=> {
alert('error code:'+error.code + ', msg:'+error.message);
});

Please help... Thank you

boj...@google.com

unread,
Jun 4, 2016, 3:47:16 AM6/4/16
to Firebase Google Group
If you are using the web sdk from a Cordova framework remove the authDomain field from the app configuration. This is temporary until we have a long term solution.
This means you won't be able to run signInWithRedirect or getRedirectResult. They don't currently work anyway.
What you can do now is use a Cordova plugin for google sign in and facebook sign in.
On success, you will get an OAuth 2 access token or id token.
You then initialize an auth credential and call signInWithCredential using the web sdk:
auth.signInWithCredential(firebase.auth.FacebookAuthProvider.credential(fbAccessToken)).then(function(user) {
  // The facebook user is now signed in.
}).catch(function(error) {
  // Some error happened!
});
To get the fb access token, you can use for example the following plugin i found: https://github.com/Wizcorp/phonegap-facebook-plugin
Hopefully, this solves your problem.

Tony Awad

unread,
Jun 10, 2016, 4:39:53 PM6/10/16
to Firebase Google Group
Thanks again for that. I am using your suggested solution for now. Please keep us updated on the progress of this. Thank you.

Pier Bover

unread,
Feb 26, 2017, 12:42:07 PM2/26/17
to Firebase Google Group
Suddenly I'm getting this error with a Cordova app on Android. I didn't get this error the last time I worked on this app a couple of weeks ago.

We have our own OAuth server and yes we have configured localhost and 127.0.0.1 in the authorized domains. This has been working fine for most of 2016...

In fact, I can login just fine (I gte the JWT, etc) but the error shows up in the console anyway every time I log in.


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



Bassam

unread,
Feb 26, 2017, 6:39:46 PM2/26/17
to Firebase Google Group
Hey Pier, are you calling getRedirectResult or signInWithPopup/Redirect  by any chance?
Also if you try to upgrade to the latest version firebase js version, does that help?

David kadiri

unread,
Jun 7, 2017, 9:39:30 AM6/7/17
to Firebase Google Group
Goto Firebase > Authentication > Sign-in Method > Add Domain.. and include your domain
Reply all
Reply to author
Forward
0 new messages