Timothy Klim
Timothy Klim

Reputation: 1267

How I can one more scopes to omniauth account?

I want split scopes in two options: 1. for offline_access,email,user_relationships 2. for offline_access,email,user_relationships and xmpp_login

How I can add both scopes and switch between them?

Upvotes: 0

Views: 167

Answers (1)

Timothy Klim
Timothy Klim

Reputation: 1267

I've solved it with

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

Upvotes: 1

Related Questions