rodrigoprimo / social-connect

WordPress plugin for signup/login using social media providers.
http://wordpress.org/extend/plugins/social-connect/
GNU General Public License v3.0
73 stars 40 forks source link

Unable to login/register with mobile devices #38

Open rodrigoprimo opened 10 years ago

rodrigoprimo commented 10 years ago

http://wordpress.org/support/topic/problems-with-apple-ios

cklosowski commented 10 years ago

I've not proven this yet, but I know that the error screen seen by the users is rendered by the wp_die() command. I'm wondering if some sort of issue is being caused by using that wp version instead of just a die() or exit();

I'll give that a shot on my site and have the users try again. WIll report back here tonight if it works.

cklosowski commented 10 years ago

For reference, this is the line I'm speaking of: https://github.com/rodrigoprimo/social-connect/blob/master/social-connect.php#L99

cklosowski commented 10 years ago

It may just be other browsers, other than Safari. I have a few users who are using Safari Mobile and it's working...will investigate that as well. So maybe it's Chrome for iOS that's the issue.

mennwebs commented 10 years ago

I've found the same problem. It happens when I sent site url to friends via Facebook message, and they opened in iOS with Facebook App's browser (internal browser / not Safari).

screen shot 2014-06-26 at 11 33 57 pm

cklosowski commented 10 years ago

Yep me as well. Also though, that wp_die() mentioned above should be switched for exit() or die(), wp_die actually causes a redirect and the and the $access_token is being lost.

I don't know a solution to the webview of Facebook app, this is caused by their webview not being smart enough to take care of the window.open() and redirect correctly. I'm telling my users to click on the 'open' button in the bottom right, and open in safari until a fix can be found.

mennwebs commented 10 years ago

Thank you so much :)

ahmednasir91 commented 10 years ago

@cklosowski its because due to limitations window.opener is undefined in some mobile browsers.

I fixed it detecting mobile devices and not opening a popup when there is a mobile device, I have implemented the solution for Facebook & Twitter only. I haven't implemented for other providers. If you want I can share my solution.

rodrigoprimo commented 10 years ago

Please open a PR.