我是社交网络身份验证的新手,但我正在开发一个使用Ionic,Node,Mongo和Satellizer https://github.com/sahat/satellizer的应用程序来与facebook进行身份验证,并且它在浏览器上工作正常但是当我在android模拟器上测试时,我收到此错误: https://drive.google.com/file/d/0B3vlNJIDJA6RTHlpeml5YjFxNUU/view?usp=sharing
我的本地配置:
// 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"
});
我的Facebook应用详情:
APP ID: 1553815514880424
网站网址 http://localhost:3000/
应用域: localhost
答案 0 :(得分:0)
我遇到了与网络客户端类似的问题,Google也给出了相同的回复。如果你去隐式流程,它会对你有用吗?尝试:
$authProvider.google({
clientId: '1553815514880424',
url: api+"auth/facebook",
responseType: 'token'
});