我正在使用rails和angular来构建一个应用程序。我正在使用satellizer登录应用程序。
这是我精心设计的配置:
config.omniauth :facebook, "xxx1", "secret", :strategy_class => OmniAuth::Strategies::Facebook在JS端:
$authProvider.loginUrl = '/users/sign_in';
$authProvider.facebook({clientId: 'xxx1', url: '/users/auth/facebook', type: '2.0'});当我选择用fb登录时,弹出窗口出现,然后我进行身份验证,最后当弹出窗口关闭时,我得到了这个错误:
XMLHttpRequest cannot load https://graph.facebook.com/oauth/authorize?response_type=code&client_id=804…allback&state=c2131db90c6208181da224094bc2043ac43be5507bc2be8a&scope=email. A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin 'http://localhost:3000' is therefore not allowed access. 你有什么想法吗?
提前谢谢。
致以敬意,
发布于 2015-02-19 19:23:29
您可以通过设置以下内容关闭它的凭据标志
$authProvider.withCredentials = false;https://stackoverflow.com/questions/28160672
复制相似问题