Problem when user has enabled Facebook's enhanced security features #40

Closed
raffael opened this Issue Oct 27, 2012 · 2 comments

Projects

None yet

2 participants

@raffael

Hey,
I'm not quite sure what's happening here, maybe Facebook has silently changed something in the Login process:
The user can activate a security feature in his FB settings, which requires to specify a Device name everytime someone is trying to log in with his Facebook account. This all worked fine with PhFacebook, until now:
After logging in using the credentials, the "Specify the device" form appears. As soon as this is submitted, a blank page appears in the Auth dialogue and the window doesn't hide itself — the whole login process is stuck.

To fix that, I tested the following which seems to work:
in PhWebViewController.m, in the didFinishLoadForFrame; insert the following code after *urlWithoutSchema processing:

if (sender!=nil) {
NSString *html = [sender stringByEvaluatingJavaScriptFromString:@"document.body.innerHTML"];
if (html==nil || [html isEqualToString:@""]) {
[parent performSelector: @selector(didDismissUI)];
[self.window orderOut: self];
return;
}
}

It will dismiss the window and the login process is finished. Don't know if it's safe to use this approach though.

@philippec
Owner

Did you deploy this code in the field? Did it work for you? I can't replicate the conditions you describe, so it makes it hard for me to review and incorporate the code...

@philippec
Owner

No activity in two years, closing.

@philippec philippec closed this Jul 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment