OpenFB icon indicating copy to clipboard operation
OpenFB copied to clipboard

SECURITY WARNING: Please treat the URL above as you would your password.

Open upender-devulapally opened this issue 10 years ago • 48 comments

I am getting blank page with following text and window is not closing in my phonegap app SECURITY WARNING: Please treat the URL above as you would your password. I already added inappbrowser plugin. Any help would be must appreciated :)

upender-devulapally avatar Aug 05 '14 15:08 upender-devulapally

I am seeing this as well. Has facebook's URL for logging in changed?

nmehta6 avatar Aug 08 '14 01:08 nmehta6

My window does close and I am getting back the access token also. Login to facebook works but I was concerned about this warning. @upender-devulapally are you on iOS or Android?

nmehta6 avatar Aug 08 '14 12:08 nmehta6

In both OS I am getting the same

upender-devulapally avatar Aug 09 '14 05:08 upender-devulapally

Seeing this in iOS as well. it only happens when I login then logout and then login again. The in app browser displays an all white page with success and then a second later the warning appears. I do not have any issues while testing in a browser. I'm clearing all the tokens on logout so I'm not sure why the behavior of 2nd login is different.

limitingfactor avatar Aug 10 '14 00:08 limitingfactor

I am having the same issue

theguy1985 avatar Sep 02 '14 11:09 theguy1985

For Cordova, install the InAppBrowser! Works fine now..

jernejc avatar Sep 21 '14 22:09 jernejc

I still got the problem even the inappbrowser already installed. anyone have already solve this?

semmatabei avatar Oct 28 '14 15:10 semmatabei

  1. Make sure you added the inAppBrowser Plugin https://github.com/apache/cordova-plugin-inappbrowser/blob/master/doc/index.md
  2. Make sure you have the oaughtcallback.html file in your www/ directory and check the openfb.js file to see if the correct path to this html is correct.

xgenem avatar Oct 28 '14 17:10 xgenem

I have tried all solutions on this thread and many others, none seem to help me. I am getting the Success Security Warning message on my android device. It works very well on my browser (I am using Visual Studio 2013 update 4).

I do have the following:

  1. InAppBowerser version 1.0.0, installed as a plugin
  2. On my FB Dev. Setting -> Basic I have: http://localhost:4437/
  3. My oauthcallback.html is in my root directory
  4. Om my FB Dev. Setting -> Advance I have: https://www.facebook.com/connect/login_success.html

Side Notes:

Initially I was getting "the redirect_uri is not supported", I fixed this by placing:

runningInCordova = true; right after this

document.addEventListener("deviceready", function () { runningInCordova = true; alert("runningInCordova"); }, false);

in the OpenFB.js file, since on my adroid device the above listener was not executing. This now gives me access to the FB login screen.

But after login in I get the Success Security Warning message. I have spent 3 days trying to resolved this issue. I have tried many, many things but nothing seems to works. I am sure there is a solution out there.

Is there a way to fix this?

Please help, Thank you in advance.

Louis

Louis777 avatar May 12 '15 01:05 Louis777

Compare your openfb.js file from mine... see if you find something https://github.com/eugenemaning/openfb.js/blob/master/openfb.js

xgenem avatar May 12 '15 05:05 xgenem

What I found out on mine is that I have to do this to get it working:

rm plugins/ios.json ionic plugins add org.apache.cordova.inappbrowser

But then somehow another plugin stops working. Just happens for iOS.

Peter

On Mon, May 11, 2015 at 10:54 PM, Eugene Maning [email protected] wrote:

Compare your openfb.js file from mine... see if you find something https://github.com/eugenemaning/openfb.js/blob/master/openfb.js

— Reply to this email directly or view it on GitHub https://github.com/ccoenraets/OpenFB/issues/30#issuecomment-101140919.

piclez avatar May 12 '15 06:05 piclez

@eugenemaning I have pasted your code to my openfb.js and I got the exact same result.

What I am thinking is that I got the wrong InAppBrowser, I have tried with the one that installs through the config.xml core plugin which is version 0.5.2 the I tried one that has version 1.0.0

Where did you get your InAppBrowser?

I don't know what else to try.

All I need is to verify the user's login and get her/his email address. It is allowing them to login, Successfully, but then I get that annoying Security Warning message.

Any other ideas?

I really appreciate any type of help, I've been at it too long.

Thank you, Louis

Louis777 avatar May 12 '15 06:05 Louis777

Hi Peter,

Thanks for answering, I am not using Ionic, I am using Angularjs, I don't know if that makes a difference. I am also only using Android for now.

Any other ideas would be greatly appreciated.

Louis777 avatar May 12 '15 13:05 Louis777

I am sorry for being a pest, but I can't find any solution for my issue. It seems to be a very easy solution, but I can't find it. I've spend many days on this already.

Please help me.

Louis777 avatar May 12 '15 23:05 Louis777

This is the https://github.com/apache/cordova-plugin-inappbrowser that I am using.

xgenem avatar May 13 '15 03:05 xgenem

Hi Eugene,

I finally fixed my problem. The solution was very simple but hard to spot.

In my index.html page I had this:

instead of this:

Although cordova.js is int the /scripts/ folder, having script/ before cordova was causing the problem. Everything else in my app worked fine, even openFB worked in the browser, except that openFB was not working in my android device. After removing /script from the path everything works fine.

I hope this might help someone.

Louis777 avatar May 13 '15 18:05 Louis777

That was funny! What a headache that was. Glad you finally solved your issue. On Thu, May 14, 2015 at 2:06 AM Louis777 [email protected] wrote:

Hi Eugene,

I finally fixed my problem. The solution was very simple but hard to spot.

In my index.html page I had this:

instead of this:

Although cordova.js is int the /scripts/ folder, having script/ before cordova was causing the problem. Everything else in my app worked fine, even openFB worked in the browser, except that openFB was not working in my android device. After removing /script from the path everything works fine.

I hope this might help someone.

— Reply to this email directly or view it on GitHub https://github.com/ccoenraets/OpenFB/issues/30#issuecomment-101761595.

xgenem avatar May 13 '15 18:05 xgenem

Yes, thank you.

Now I am running in to the following problem in the browser, when I go to login it's telling me:

//////////////////////////////////////////////// InAppBrowser Emulation It is like a browser, only it is all up in your app

URL:

https://www.facebook.com/dialog/oauth?client_id=123456789&redirect_uri=https://www.facebook.com/connect/login_success.html&response_type=token&scope=email

TARGET:

_blank OPTIONS:

"location=no" ///////////////////////////////////////////

Do you have any idea why this might be happening?

Android device is still working fine.

Thanks,

Louis777 avatar May 13 '15 19:05 Louis777

Anyone have an answer for this, i am seeing the exact same screen :(

wpitallo avatar Jun 01 '15 09:06 wpitallo

Hi, can you check your facebook app to ensure you have added the "website" platform?

In Facebook Developers Console, go to your app then go to "Basic" section and under the section with App ID, click "Add Platform" and choose "website". You do not have to add any of the URLs since you're using cordova.

Also make sure that you have turned on OAuth Login in the "Advanced" section

This worked for me. Let me know if it works for you

sajclarke avatar Jun 08 '15 06:06 sajclarke

hi.. i got the SECURITY WARNING: Please treat the URL above as you would your password. only on the ios device while in android in works like charm.. anybody face the same issue? i develop the app using ionic and run the app from ionic view.. do you guys know why this happens? your feedback much appreciate.. Thanks

syafiqFiqq avatar Jun 16 '15 07:06 syafiqFiqq

Got the same issue on Android (Samsung Galaxy Tab 3 - on Android 4.2.2 JellyBean). Had to install and configure a whitelist for facebook;

#install the plugin cordova plugin add https://github.com/apache/cordova-plugin-whitelist.git

#Add whitelist(s) to the bottom of config.xml (before closing tag!). NOTE: Only use these values for testing;

<allow-navigation href="*" />
<access origin="*" />
<allow-intent href="*" />

#Test if it works with the above settings. If it does, you should lock this down a little.. I haven't tested this out yet, but I think all you'll need is;

<allow-navigation href="*://*.facebook.com/*" />
<allow-intent href="*://*.facebook.com/*" />

jordxn avatar Jun 24 '15 17:06 jordxn

I'm having the same security issue, can anyone show the steps what you did in Facebook App as well as opneFB.js.

I've even set static: runningInCordova = true; in openfb.js and also installed plugin name="cordova-plugin-inappbrowser" in config.xml.

immayankmodi avatar Jun 27 '15 05:06 immayankmodi

How to solve all of those issues, you need to include a link to cordova.js in your index, without a link cordovaisrunning will always be false and this cause the first problem "URL not supported", also the security warning caused for the same reason.

ghost avatar Jul 07 '15 11:07 ghost

Hi guys,

Anyone finally found a solution to this issue ? I have spent all my day on it and I am still facing with this error ... I tried all your suggestions like change my version of cordova-plugin-inappbrowser, set runningInCordova variable to true, include cordova.js in my index.html ... But not successfully.

In more details, my cordova/ionic app works like a charm on my android device, on ionic serve too but I have this error on iOS simulator with iOS 9 and 8.4. I didn't try with older version of iOS but I don't think it will be better.

Any suggestions or solutions will be welcome !

willemotlucas avatar Oct 31 '15 18:10 willemotlucas

Any solution for this issue? I didn't find the solution for "secure warning ....", @Louis777 can you explain your solution? I cant see the code in your comment.

ignacio-chiazzo avatar Jan 10 '16 01:01 ignacio-chiazzo

Also needing a solution, doesn't work on Android at all, so far.

leomoty avatar Jan 21 '16 16:01 leomoty

I have the same problem, android not working at all. I'm stuck at the Success Security Warning and the page does not return to the app.

biamacedo avatar Jan 23 '16 17:01 biamacedo

Got the same problem on my virtual android device...

marcoBros avatar Jan 26 '16 17:01 marcoBros

I fixed this issue to change this line :

loginWindow.addEventListener('loadstart', loginWindow_loadStartHandler);

by :

loginWindow.addEventListener('loadstop', loginWindow_loadStartHandler);

The callback of the listener was never called, maybe because the window was already loaded with the url before to create the listener to know if the window is loading.

So now, the listener check if the window is loaded and not loading.

marcoBros avatar Jan 26 '16 21:01 marcoBros