You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Facebook as OmniAuth provider, I want to retrieve first_name and last_name instead of name. The problem is located here where info_fields value is hardcoded to 'email, name' instead of being extendable (in my case to 'email, first_name, last_name'). Is there any reason why you hardcoded this? Also, is there any way to properly override this module method?
The text was updated successfully, but these errors were encountered:
I'm having similar problem. I have custom omniauth gem which requires additional params to be passed (scope, base_uri) when we setup config.omniauth. And it will be great if there was a possibility to make setup_key_for method a bit more flexible
OmniAuth::Strategies::Facebook.class_eval do
def request_phase
options[:scope] ||= 'email'
options[:info_fields] = 'first_name,last_name,email'
options[:display] = mobile_request? ? 'touch' : 'page'
super
end
end
I know it's not a definitive solution, I agree it should be dynamic, but it should work for now.
When using Facebook as OmniAuth provider, I want to retrieve
first_name
andlast_name
instead ofname
. The problem is located here whereinfo_fields
value is hardcoded to'email, name'
instead of being extendable (in my case to'email, first_name, last_name'
). Is there any reason why you hardcoded this? Also, is there any way to properly override this module method?The text was updated successfully, but these errors were encountered: