Skip to content

Commit

Permalink
update authhash
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispeterson committed Aug 12, 2011
1 parent e5cfd57 commit 3ed8174
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions oa-oauth/lib/omniauth/strategies/oauth2/liveid.rb
Expand Up @@ -18,8 +18,7 @@ module Strategies
class Liveid < OmniAuth::Strategies::OAuth2
# @option options [String] :scope separate the scopes by a space
def initialize(app, client_id=nil, client_secret=nil, options={}, &block)
client_options = {
:site => 'https://oauth.live.com',
client_options = {
:authorize_url => 'https://oauth.live.com/authorize',
:token_url => 'https://oauth.live.com/token'
}
Expand All @@ -43,11 +42,9 @@ def auth_hash
def request_phase
options[:scope] ||= 'wl.signin wl.basic'
options[:response_type] ||= 'code'
options[:display] ||= 'popup'
super
end


def user_data
@data ||= MultiJson.decode(@access_token.get('https://apis.live.net/v5.0/me').body)
end
Expand All @@ -56,6 +53,7 @@ def user_info
{
'id' => user_data['id'],
'name' => user_data['name'],
'email' => '',
'first_name' => user_data['first_name'],
'last_name' => user_data['last_name'],
'link' => user_data['link'],
Expand Down

0 comments on commit 3ed8174

Please sign in to comment.