mirror of
https://github.com/simi/omniauth-facebook.git
synced 2022-11-09 12:32:45 -05:00
set uid from raw_info
This commit is contained in:
parent
0106bb4b15
commit
8484d7cca5
2 changed files with 9 additions and 0 deletions
|
@ -17,6 +17,8 @@ module OmniAuth
|
|||
:param_name => 'access_token'
|
||||
}
|
||||
|
||||
uid { raw_info['id'] }
|
||||
|
||||
def build_access_token
|
||||
super.tap do |token|
|
||||
token.options.merge!(access_token_options)
|
||||
|
|
|
@ -43,4 +43,11 @@ describe OmniAuth::Strategies::Facebook do
|
|||
subject.access_token_options[:header_format].should eq('OAuth %s')
|
||||
end
|
||||
end
|
||||
|
||||
describe '#uid' do
|
||||
it 'returns the id from raw_info' do
|
||||
subject.stub(:raw_info) { { 'id' => '123' } }
|
||||
subject.uid.should eq('123')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue