开发者

Omniauth OpenId authentication returns nil on user_info

I am using Ruby 1.9.2 + Rails 3 + Devise + Omniauth and trying to authenticate users with Openid.

My providers on omniauth.rb are

provider :open_id, OpenID::Store::Filesystem.new('/tmp')

provider :open_id, OpenID::Store::Filesystem.new('/tmp'),
 {:name => "google", :identifier => "https://www.google.com/accounts/o8/id" }

provider :open_id, OpenID::Store::Filesystem.new('/tmp'),
 {:name => "yahoo", :identifier => "https://me.yahoo.com" }

I am redirected correctly to the providers and callback is called. However for myopenid, it always returns nil on the user_info hash. And for both google or yahoo it returns a 400 (Bad Request) when the callback url is called.

For google and yahoo, I added :required => [] param (not really sure what id does) and it didnt return 开发者_运维问答the 400 error, but again user_info was nil


It could be permissions. Try Changing ('tmp') to ('./tmp')

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜