I have an HTML5 application that uses Azure Mobile Services Authentication to login (directly from the sample code ... below). It works great in all desktop browsers and iPhone 5 in Safari. But from the application / full-screen mode, it does nothing (does not request permission to display a pop-up window, as in safari, and pop-up windows do not appear), and I can always wait, and nothing happens. If I call it a second time, you will get the error message "Error: unexpected failure" ... maybe because the first attempt is still working? Any help / understanding is clear.
client.login ("facebook").done(function (results) { alert("You are now logged in as: " + results.userId); }, function (err) { alert("Error: " + err); });
edited update with additional information and 2 potential ideas *
I did some more research and found a site that uses an approach that overcomes this problem, and also solves two other side effects when using the Azure mobile authentication approach. I think the Azure mobile team might look for something like this because the code has some hints of other authentication options (although it’s hard to read and be sure because the code minimized is hidden). It may just be a matter of activating them in code ...
"Decision":
Go to http://m.bcwars.com/ and click on Facebook. You will see that it works great in iPhone Safari in “application mode” instead of making a popup, it just stays in the current browser window.
This approach solves two other problems with the current Azure mobile approach. Firstly, the pop-up window is interpreted by most browsers as a potential ad and either blocks automatically (desktop Chrome) ... and the user does not know why it is not working ... or gives a warning that the user must approve (iPhone Safari in "browser mode" "), which is the problem. And if the user has a pop-up blocker, it becomes more difficult and even more opportunities for the user to not work correctly. The bcwars.com method does not have this problem.
Secondly, on iPhone Safari, when the pop-up window closes automatically, the original page does not receive focus if other browser windows are open in Safari. Instead, it is in smaller / slide mode so that they can choose which one to show. If this happens, the user must go through another sttep ... click on the browser window to activate it and give it focus .. more pain and more potential for them to spoil, and not do it right and you need Help. M.bcwars.com does not have this problem.
Azure Options:
Looking at the Azure mobile code, there seems to be a solution already. I cannot read this easliy because it is minimized / fabricated, but it has 4 options (including iFrame, etc.) to invoke authentication, and only 1 is used (a “less perfect” pop-up). An easy solution would be to set a property that allows you to work with one of the alternative authentications. But I cannot read it well enough to understand it. Another would be to crack the code (temporarily until the fix is installed by Microsoft).
Can I help a little?