{"action":"created","issue":{"url":"https://api.github.com/repos/sahat/satellizer/issues/674","labels_url":"https://api.github.com/repos/sahat/satellizer/issues/674/labels{/name}","comments_url":"https://api.github.com/repos/sahat/satellizer/issues/674/comments","events_url":"https://api.github.com/repos/sahat/satellizer/issues/674/events","html_url":"https://github.com/sahat/satellizer/issues/674","id":121904326,"number":674,"title":"Facebook iPhone (html5mode)","user":{"login":"mikepc","id":878739,"avatar_url":"https://avatars.githubusercontent.com/u/878739?v=3","gravatar_id":"","url":"https://api.github.com/users/mikepc","html_url":"https://github.com/mikepc","followers_url":"https://api.github.com/users/mikepc/followers","following_url":"https://api.github.com/users/mikepc/following{/other_user}","gists_url":"https://api.github.com/users/mikepc/gists{/gist_id}","starred_url":"https://api.github.com/users/mikepc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikepc/subscriptions","organizations_url":"https://api.github.com/users/mikepc/orgs","repos_url":"https://api.github.com/users/mikepc/repos","events_url":"https://api.github.com/users/mikepc/events{/privacy}","received_events_url":"https://api.github.com/users/mikepc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-12-13T07:09:35Z","updated_at":"2015-12-18T09:32:41Z","closed_at":null,"body":"I'm running a MEAN stack application in html5mode.\r\n\r\nSatellizer is working great, except Facebook (iPhone only) doesn't work (most of the time o.0). It works sometimes, but a third of the time it doesn't finish authenticate(), but just redirects to the website root. I've spent about 8 hours on this problem to no avail :(\r\n\r\nThe app is behind an nginx reverse proxy, if that might help.\r\n// Configuration.\r\nangular.module(ApplicationConfiguration.applicationModuleName, \r\n              ApplicationConfiguration.applicationModuleVendorDependencies).config(['$locationProvider', '$authProvider',\r\n  function ($locationProvider,  $authProvider) {\r\n\r\n              $locationProvider.html5Mode(true).hashPrefix('!');\r\n\r\n\r\n               $authProvider.facebook({\r\n                  clientId: window.FACEBOOK_ID\r\n                });\r\n\r\n                $authProvider.google({\r\n                  clientId: window.GOOGLE_ID\r\n                });\r\n\r\n                $authProvider.twitter({\r\n                  clientId: window.TWITTER_KEY\r\n                });\r\n                \r\n                $authProvider.baseUrl = '/';\r\n                \r\n                $authProvider.loginUrl =  '/auth/login';\r\n                $authProvider.signupUrl = '/auth/signup';\r\n                $authProvider.unlinkUrl = '/auth/unlink/';\r\n                \r\n\r\n    \r\n\r\n}]);\r\n\r\n//Authenticate\r\n    \r\n    $scope.authenticate = function(provider){\r\n     $auth.authenticate(provider)\r\n        .then(function() {\r\n             toastr.success('You have successfully signed in with ' + provider + '!');\r\n            \r\n              /*\r\n              if($state.previous.state.name === 'home' || $state.previous.state.name === 'authentication.signup')\r\n              {\r\n                  $state.go('listPads');\r\n              }else{\r\n\r\n               // And redirect to the previous or home page\r\n                $state.go($state.previous.state.name || 'listPads', $state.previous.params);\r\n              }\r\n              */            \r\n\r\n             \r\n             $location.path('/pads');\r\n\r\n \r\n        })\r\n        .catch(function(error) {\r\n          if (error.error) {\r\n            // Popup error - invalid redirect_uri, pressed cancel button, etc.\r\n            toastr.error(error.error);\r\n          } else if (error.data) {\r\n            // HTTP response error from server\r\n            toastr.error(error.data.message, error.status);\r\n          } else {\r\n            toastr.error(error);\r\n          }\r\n        });\r\n    };\r\n\r\nYou'll notice the $state() change has been commented out, that was a result of my troubleshooting to see if the state change was mucking with things. The only considerable difference between my app and the sample app is the fact that html5mode is Enabled. Is this the cause? Any possible workarounds? I need html5mode to work.\r\n\r\nEverything works fine on the desktop. On iPhone on Safari and Chrome, facebook doesn't work.\r\n\r\nAny help at all would be appreciated. Thanks in advance.\r\n\r\nUPDATE: I tried adding an empty route and setting that empty route as the facebook redirect, but it just dumps me at a blank page :(\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/sahat/satellizer/issues/comments/165725306","html_url":"https://github.com/sahat/satellizer/issues/674#issuecomment-165725306","issue_url":"https://api.github.com/repos/sahat/satellizer/issues/674","id":165725306,"user":{"login":"aligajani","id":1730778,"avatar_url":"https://avatars.githubusercontent.com/u/1730778?v=3","gravatar_id":"","url":"https://api.github.com/users/aligajani","html_url":"https://github.com/aligajani","followers_url":"https://api.github.com/users/aligajani/followers","following_url":"https://api.github.com/users/aligajani/following{/other_user}","gists_url":"https://api.github.com/users/aligajani/gists{/gist_id}","starred_url":"https://api.github.com/users/aligajani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aligajani/subscriptions","organizations_url":"https://api.github.com/users/aligajani/orgs","repos_url":"https://api.github.com/users/aligajani/repos","events_url":"https://api.github.com/users/aligajani/events{/privacy}","received_events_url":"https://api.github.com/users/aligajani/received_events","type":"User","site_admin":false},"created_at":"2015-12-18T09:32:41Z","updated_at":"2015-12-18T09:32:41Z","body":"You can use Web Inspector\n\nOn Fri, Dec 18, 2015 at 12:38 PM, Barry vd. Heuvel <notifications@github.com\n> wrote:\n\n> You can connect your Safari dev tools with the iPhone browser.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/sahat/satellizer/issues/674#issuecomment-165703905>.\n>\n\n\n\n-- \n\n\nAli Gajani\nFounder at Mr. Geek\nwww.mrgeek.me\nwww.aligajani.com\n"}}