簡體   English   中英

衛星化和Facebook登錄

[英]Satellizer and Facebook login

我正在使用rails和angular來構建應用程序。 我正在使用衛星導航器登錄應用程序。

這是我的設計配置:

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. 

你有什么主意嗎?

提前致謝。

問候,

您可以通過設置關閉憑據標志

$authProvider.withCredentials = false;

更多詳細信息: https : //github.com/sahat/satellizer/releases/tag/0.9.1

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM