lib/omniauth/strategies/dailycred.rb in dailycred-0.1.25 vs lib/omniauth/strategies/dailycred.rb in dailycred-0.1.26

- old
+ new

@@ -18,11 +18,11 @@ # parameters to expect and return from dailycred responses ATTRIBUTES = ["email", "username", "created", "verified", "admin", "referred_by", "tags", "referred"] # allows parameters to be passed through - AUTH_PARAMS = ["action"] + AUTH_PARAMS = ["action","identity_provider","referrer"] option :authorize_options, OmniAuth::Strategies::Dailycred::AUTH_PARAMS uid { user['id'] } @@ -57,20 +57,21 @@ def user return @duser if !@duser.nil? connection = Faraday::Connection.new options.client_options[:site], options.client_options[:ssl] response = connection.get("/graph/me.json?access_token=#{access_token.token}") json = JSON.parse(response.body) - pp json + # pp json @duser = {'token' => access_token.token} @duser['provider'] = 'dailycred' @duser['uid'] = json['id'] || json['user_id'] OmniAuth::Strategies::Dailycred::ATTRIBUTES.each do |attr| @duser[attr] = json[attr] end if !json["FACEBOOK"].nil? @duser['facebook'] = json["FACEBOOK"]["members"] + @duser['facebook']['access_token'] = json["FACEBOOK"]['access_token'] end - pp @duser + # pp @duser @duser end end \ No newline at end of file