I am using version 0.7.7 of the Sorcery Authentication Gem by NoamB on my Rails 3.2 App
I am looking for a possibility how i can hook up a method which is doing the user info mapping for a specific external login provider (e.g. facebook, twitter)
.
For example I want to change the provided locale to the format I use in my database or I want to download the user avatar from twitter as part of the matching process.
By default it is only possible this way over the sorcery.rb
file:
config.facebook.user_info_mapping = {:email => "email", :first_name => "first_name", :last_name => "last_name" ...
I know I can achieve such behavior with setter methods on my user model but I want to keep these things separate from the model and I want to be able to define them specifically for each provider.
Is this possible? / What is the best way to implement such extended mapping options?
Thanks for your help!