我怎么能再一个范围到omniauth帐户?

时间:2012-11-16 07:23:56

标签: ruby-on-rails ruby-on-rails-3 devise omniauth

我想在两个选项中分割范围: 1. for offline_access,email,user_relationships 2.对于offline_access,email,user_relationships和xmpp_login

如何添加两个范围并在它们之间切换?

1 个答案:

答案 0 :(得分:1)

我用

解决了这个问题
config.omniauth :facebook, Setting.for(:facebook_id), Setting.for(:facebook_secret), scope: 'offline_access,email,user_relationships'
config.omniauth :facebook_extended, Setting.for(:facebook_id), Setting.for(:facebook_secret), scope: 'offline_access,email,user_relationships,xmpp_login', name: :facebook_extended, strategy_class: OmniAuth::Strategies::Facebook