0

I'm using the OmniAuth GEM and have successfully got it working with the twitter strategy. I am now trying to set up the ability for users to also use there facebook login.

I got it to the point where it correct redirected me to facebook. I confirmed access on the facebook site and got redirected back to my callback url (the default auth/facebook/callback) but here it errors.

I have the same routes as for twitter

  match "auth/facebook/callback" => "sessions#create"
  match "auth/twitter/callback" => "sessions#create"

but I am getting a error

Faraday::Error::ConnectionFailed SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

The one thing I find very wrong is the session dump is showing this (having replaced some keys with XXX/ABC)

_csrf_token: "ABC/ABC=" oauth: {"twitter"=>{"callback_confirmed"=>true, "request_token"=>"XXX", "request_secret"=>"XXX"}} session_id: "XXX"

It is mentioning twitter in here, but I tried to login with facebook. Maybe something to do with the fact I was logged in with twitter before signing out and trying to log in with facebook. but I doubt it and think this is something to do with the reason its not working for me.

4

1 に答える 1

0

こんにちは、あなたの代わりに以下のルートを使用できます

match "auth/:provider/callback" => "sessions#create"

Facebookの設定を次のように変更します

アカウント設定 => セキュリティ => セキュア ブラウジング => 無効

スクリーンショットに添付されているとおり。ここに画像の説明を入力

したがって、ローカルは無効にするだけで、本番環境でSSL証明書を購入すると機能します。

于 2013-05-02T15:51:16.583 に答える