angularfire icon indicating copy to clipboard operation
angularfire copied to clipboard

Ionic2 (Cordova + inappbrowser) OAuth issue

Open quentinchap opened this issue 10 years ago • 19 comments

Hi,

I have some troubles with Facebook OAuth in my ionic2 app. I found this error in my console:

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

All was ok before update and to the last Beta and before firebase migration and all seems to be good in firebase configuration.

To finish all is ok with a PC this issue is only after bluid in smartphone.

Maybe an incompatibility with inappbrowser plugin?

quentinchap avatar Jun 22 '16 19:06 quentinchap

This StackOverflow answer suggests it may be that the app is using 127.0.01 instead of localhost, which hasn't been added to authorized domains for the project: http://stackoverflow.com/questions/37344066/firebase-this-domain-is-not-authorized

Can you try that and comment back here if it helps?

I'm closing the issue for now since it doesn't appear to be AngularFire specific.

jeffbcross avatar Jun 22 '16 20:06 jeffbcross

I found this post and i try to add 127.0.0.1 and localhost to authorized domains for the project but it doesn't work and all was ok with legacy console.

I find an other error, you'll may be have some idea:

file://apis.google.com/js/api.js?onload=__iframefcb120046 Failed to load resource: net::ERR_FILE_NOT_FOUND

thank you

quentinchap avatar Jun 22 '16 20:06 quentinchap

New error, after an update to firebase v 3.0.5 i have this error:

This operation is not supported in the environment this application is running on. "location.protocol" must be http or https.

It seems to be same issue than #243

quentinchap avatar Jun 22 '16 20:06 quentinchap

Can you npm install angularfire2@next and make sure the location.protocol issue goes away? On Wed, Jun 22, 2016 at 1:51 PM CHAPELLE Quentin [email protected] wrote:

New error, after an update to firebase v 3.0.5 i have this error:

This operation is not supported in the environment this application is running on. "location.protocol" must be http or https.

It seems to be same issue than #243 https://github.com/angular/angularfire2/issues/243

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/angular/angularfire2/issues/270#issuecomment-227872560, or mute the thread https://github.com/notifications/unsubscribe/AAcTV2DFZoaVdQcP3gKmQjs2r6T2cGG7ks5qOaBhgaJpZM4I8Hwu .

jeffbcross avatar Jun 22 '16 20:06 jeffbcross

I tried, on my pc no problem but on my phone it's not working.

Complete message:

code: "auth/operation-not-supported-in-this-environment" message:"This operation is not supported in the environment this application is running on. "location.protocol" must be http or https."

quentinchap avatar Jun 22 '16 20:06 quentinchap

What version does it say in the package.json of angularfire2 node package? On Wed, Jun 22, 2016 at 1:56 PM CHAPELLE Quentin [email protected] wrote:

I tried, on my pc no problem but on my phone it's not working.

Complete message:

code: "auth/operation-not-supported-in-this-environment" message:"This operation is not supported in the environment this application is running on. "location.protocol" must be http or https."

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/angular/angularfire2/issues/270#issuecomment-227873909, or mute the thread https://github.com/notifications/unsubscribe/AAcTV_QaHHD4AyBSwb4neIbGUOg_FtFIks5qOaGMgaJpZM4I8Hwu .

jeffbcross avatar Jun 22 '16 20:06 jeffbcross

"angularfire2": "^2.0.0-beta.3-0930330"

quentinchap avatar Jun 22 '16 20:06 quentinchap

i am having the same issue guys . Please advise . I am building an IONIC App and using the new Firebase SDKS .

prakharter avatar Jun 30 '16 11:06 prakharter

having same issue with firebase 3.1.0

ciekawy avatar Jun 30 '16 17:06 ciekawy

Also got this, it works on web but no luck on phone i set my app.ts constructor like this.

if (window.cordova) {
    window.open = InAppBrowser.open;
}

idesignpixels avatar Jul 04 '16 12:07 idesignpixels

I have exacly the same problem. In web it is perfect. In my android phone i get this error.

esbrito avatar Aug 14 '16 22:08 esbrito

any fix

MahmoudHboubati avatar Sep 17 '16 17:09 MahmoudHboubati

image

same issue

MahmoudHboubati avatar Sep 17 '16 17:09 MahmoudHboubati

same issue

dc-apps avatar Sep 22 '16 11:09 dc-apps

I get the same problem in ionic1 and firebase 3.4.0

gollodev avatar Sep 26 '16 23:09 gollodev

Same problem: browser (ionic serve) worked but not when deploying the app to cell phone on Ionic 2.

using: ionic-angular: 2.3.0 angularfire2: ^2.0.0-beta.7-pre firebase: 3.7.3

All in newest version as of 3/27/17.

ltung avatar Mar 27 '17 17:03 ltung

I have the same problem!

richardmatthewsdev avatar Mar 30 '17 01:03 richardmatthewsdev

Same problem here using Ionic2 and Firebase 3.9.0 Is there any workaround?

phablulo avatar May 11 '17 18:05 phablulo

This is not an AngularFire specific issue. You must enable domains in your admin console, you must use the domains that are authorized there. Reports of "same problem" here aren't helpful and don't provide any further indication of why this might be the purview of AngularFire.

If you can trace this back with an effective, minimal repo to an issue with AngularFire, then please submit a new issue with a detailed repro.

katowulf avatar May 11 '17 18:05 katowulf