-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor login() method to invoke FB.login() synchronously. Fixes issue ... #48
Conversation
@Ciul, issue #24 is caused by the asynchronous I've removed the call to $timeout, and in its place, have added synchronous call to Hope this makes it in. I'd like to use this library in production but can't do so until this issue is resolved. :). |
It's a shame this repo seems quite inactive recently and no improvements have made it into master for about 7 months. |
Hi Sam, This repo is open source, which means that people who use it should be the same that maintains it. I haven't worked in any more projects that need facebook login, that's why I haven't done any change in it anymore. But, anyone who wants to collaborate can write to me and I will add him/her right away. Regards, |
@Ciul, can you add me as a collaborator? I'd be happy to help maintain the project. |
Of course @obibring :) |
http://plnkr.co/edit/XS49bbJyYlDIKubXxhtA?p=preview here's is an example which works nicely with this refactoring. Looking forward to merge it soon. Can anybody proof that this example is working, too ? |
@mrzmyr, the plunker you provided calls var userIsConnected = false;
Facebook.getLoginStatus(function(response) {
if (response.status === 'connected')
userIsConnected = true;
});
$scope.IntentLogin = function() {
if (!userIsConnected)
$scope.login();
}; |
@obibring thanks, i updated the plnkr. |
@mrzmyr Works for me now 👍 |
@mrzmyr, I tested the both the previous and current versions of your plunker against ie10 and ie11. Both browsers blocked the popup in the previous version of the plunker, and both browsers showed the popup in the newest version of the plunker. |
@obibring thanks for testing 👯 |
@mrzmyr, any concerns? I think we should be ready to go with this one. |
no concerns, but it would great to have a test for it. I already set up a protractor test for it yesterday, but get stuck when spawning up the app instance. The app (got it from the current plnkr without the new changes) always allowed the popup. This is another topic, so i'm looking forward to open up a issue for that. |
So i added a test in #66 for it. |
refactor(login): Refactor login() method to invoke FB.login() synchronously closes #24
Fixes #24 by placing calls to
FB.login
outside of asynchronous$timeout
calls.