I am new in this of authentication with social networks, but I am developing an application with Ionic, Node, Mongo and Satellizer https://github.com/sahat/satellizer to make the auth with facebook and It's working fine on the browser but when I test it on android emulator I get this error: https://drive.google.com/file/d/0B3vlNJIDJA6RTHlpeml5YjFxNUU/view?usp=sharing
My local configuration:
// Satellizer configuration
// Configuration common for all providers.
var commonConfig = {
// Popup should expand to full screen with no location bar/toolbar.
popupOptions: {
location: 'no',
toolbar: 'no',
width: window.screen.width,
height: window.screen.height
},
};
// Change the platform and redirectUri only if we're on mobile
// so that development on browser can still work.
if (ionic.Platform.isIOS() || ionic.Platform.isAndroid()) {
commonConfig.redirectUri = 'http://localhost:3000';
}
api = "http://127.0.0.1:3000/";
//api = "https://testing-miguelcrespo.c9.io/";
$authProvider.loginUrl = api+'auth/login';
$authProvider.signupRedirect = '/';
$authProvider.facebook({
clientId: '1553815514880424',
url: api+"auth/facebook"
});
My facebook app details:
APP ID: 1553815514880424
Site URL: htt*p://localhost:3000/ (The * is for restriction of stackoverflow)
App Domains: localhost
I had a similar issue with a web client and Google giving the same response. Will it work for you if you go for implicit flow. Try:
$authProvider.google({
clientId: '1553815514880424',
url: api+"auth/facebook",
responseType: 'token'
});