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
|
@ -16,6 +16,8 @@ module OmniAuth
|
||||||
:header_format => 'OAuth %s',
|
:header_format => 'OAuth %s',
|
||||||
:param_name => 'access_token'
|
:param_name => 'access_token'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uid { raw_info['id'] }
|
||||||
|
|
||||||
def build_access_token
|
def build_access_token
|
||||||
super.tap do |token|
|
super.tap do |token|
|
||||||
|
|
|
@ -43,4 +43,11 @@ describe OmniAuth::Strategies::Facebook do
|
||||||
subject.access_token_options[:header_format].should eq('OAuth %s')
|
subject.access_token_options[:header_format].should eq('OAuth %s')
|
||||||
end
|
end
|
||||||
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
|
end
|
||||||
|
|
Loading…
Reference in a new issue