facebook login development mode refused to display - facebook-javascript-sdk

I'm in development mode. The link I'm using to login into facebook is already using _top as target
Here is the error:
Refused to display
'https://www.facebook.com/connect/ping?client_id=299414960683257&domain=localhost&origin=1&redirect_uri=https%3A%2F%2Fstaticxx.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D43%23cb%3Df6b24dd350a5c%26domain%3Dlocalhost%26origin%3Dhttps%253A%252F%252Flocalhost%252Ff1a8662460963a%26relation%3Dparent&response_type=token%2Csigned_request&sdk=joey'
in a frame because it set 'X-Frame-Options' to 'deny'.
I had same error in a previous project and I resolved just using _top as target. Another important detail is that I've no error if the user is already logged in facebook. So the error is shown only when the login procedure try to show login page, the same doesn't happens on first access when the user have to allow permissions required by the app.
As I understood in development mode only app's developers, testers and administrators can login. But I can't find anywhere that the user must be already logged in when click on login button. May this error disappear when the app switch in live mode or there could be other problems?

Related

How to resolve "No credentials available" Issue in google One Tap Login?

I am working in one project in which I need to integrate Google One Tap Login which show All accounts list that were currently logged in into browser.
One Tap Login Iframe is adding successfully in localhost environment but With the use of same PROVIDER_ID, When I deploy my project into server with staging url.
I got Issue with Open Iframe. It is always show error like "noCredentialsAvailable: No credential is available for the current user." But I already have login with two accounts in gmail.
I can't understand this kind of behaviour of Iframe.
Another question of StackOverflow say's that put button of Google for login via google. but I want to resolve this issue.
Is there any missing code from my side ?
Same Prvider ID is used in Localhost and Staging(subdomain) Still Error is occur.

Facebook SDK - Unity - Login to another Account after first Login?

Hi i´ve a qestion so i integrated the facebook sdk for unity and there when you login once it stores your logindatat somewhere i´dont know so you don´t have to login again each time if you want to play the game how this said
"This property might be true when SetInit is called if the API detects that the user has already previously authed the app in a previous session. This means the user doesn't have to click the login button every time they play the game."
But now i want to know how i can login into another account if i logged in once ...
Thus i have to login the stored information which facebook sdk stores to login into an account.
Cause if i want to login after first time facebook don´t ask me to which account i want to login.
So there must be some "stored" playerprefs which i can overwrite so that the sdk thinks again thats must be the first login ? : /
Or isn´t that feasible ?
You have to logout manually if you have the Facebook App installed on your device. Then you can login with another account from your app. Otherwise FB.logout() should work to logout if you don't have the FB App installed and you'll be able to login via some browser again.

How to achieve "Remember Me" functionality for both local and remote login pages?

I have a requirement in my application for iOS and Android, developed using IBM Worklight, to remember the user ID if the user selected this option.
I can achieve this by using localStorage, but the issue is that I have two login pages:
One is placed within the application, and the
Second is hosted on a remote server
Depending on the conditions the application will meet, either the remote login page will be displayed or the local login page will be displayed.
If I use localStorage on local page it is not accessible for server side login page. So I want to use some storage/file on the mobile to store my user id which is accessible for both local and server login page. Is this is possible using worklight/phonegap storage?
More explanation:
Remote login page is hosted on some www.xxx.com domain. My requirement is on launch of application the local login page is shown to the user, there user can enter user id and password and selects remember me option and submits form. Then user logs in and navigated to some xxx.com/yyy server page. From there when user clicks on log out it navigates to remote login page which is hosted on www.xxx.com server. As user already checked remember me option in local page the remote login page has to pre populate the user id text box. And same scenario should happen when user enters credentials in remote login page and selects remember me check box. So when user kills the application from background and relaunches the application user will get local login page where I need to pre populate the user id last time he entered.
Short answer: in my opinion, no.
Longer answer: I will explain what I think using your scenario:
Remote login page is hosted on some www.xxx.com domain. My requirement
is on launch of application the local login page is shown to the user,
there user can enter user id and password and selects remember me
option and submits form.
So far so good. You can store it in either Web Storage or JSONStore or use Cordova File API. Catch: all of these are available ONLY for the specific application.
Then user logs in and navigated to some xxx.com/yyy server page. From
there when user clicks on log out it navigates to remote login page
which is hosted on www.xxx.com server. As user already checked
remember me option in local page the remote login page has to pre
populate the user id text box.
Still plausible. Lets say the user selected 'Remember Me', so you can adjust the URL pointing to the remote login page and send with it as parameters the username and password. Assuming that there will a mechanism to handle those on the remote page.
This does not come for free, though.
This is not meant to work out-of-the-box. It's worth noting that whether Web Storage (localStorage...) is used or any other type of storage- the application and the Cordova InAppBrowser do not share the same localStorage, and the same is true if you open a new WebView.
And same scenario should happen when user enters credentials in remote
login page and selects remember me check box. So when user kills the
application from background and relaunches the application user will
get local login page where I need to pre populate the user id last
time he entered.
This is also a problem IMO, because any application is sandboxed - be it the browser app or the Worklight app, each of them is sandboxed. so you can't just go to website X, and create some localStorage for it and expect that data to be available for another WebView belonging to another app. That's the whole point of sandboxing, in order to protect the app.
And in this case, where the remote "page" will save the data, only Web Storage is available anyway, as JSONStore requires the Worklight API, which is not available when you load external websites.
Notes:
Since you want to save both username and password, you'd probably want to encrypt them in some way, so JSONStore and WL.EncryptedCache are your options, rather than plain Web Storage.

How to authorise an application to use Facebook credentials of Setting in iOS?

In my app I want to add Facebook Login. I have already done that but the problem as of now is I get a Pop Up to login via Facebook. I want if user has installed Facebook application in his device there should not come any pop up for login. As the user has already provided his credentials to the device. The basic intention is to use the credentials of setting and log in to the my app without so that Facebook installed app user doest need to give his/her credentials again.

get same permission screen every time when login with facebook app installed in the iOS device

I am using Facebook iOS SDK v3.5 for my app, I found that if I installed the facebook app and was not logged into the iOS device (Settings > facebook), then if I was logged into my app for the first time, it works fine: it will switch to the facebook app's login view and show some permissions with a "OK" and a "cancel" button. but after I was logged into my app and logged out and logged in again, the same permission screen in the facebook app will still be shown. I think the expected behavior is that when log in for the second time we should not see that permission screen since we have already granted these in the first time log in.
The same thing happens in the sample project "Scrumptious" in the FB SDK v3.5. Does someone know how to solve this problem? Thanks.
If I understand you correctly, the behavior is working as intended. Basically, the semantic here is that the user has logged out, so it is appropriate to ask them to confirm to log in again. Specifically the logout code in the sample (and in most apps) is to clear the token cache on the device, so the next time the app is asking for a new token.
You are right that once a user has granted permissions (and until they revoke them), the Facebook servers do know this. As a result there is a slightly nuanced flow in the login screen (you can see this by granting publish to scrumptious, and then the next time you request post it will be something akin to "you've already granted this permission").
So, you could technically not clear the token cache but then why bother with a log out option.
Hope that helps.