lib/omniauth/strategies/dailycred.rb in dailycred-0.1.4 vs lib/omniauth/strategies/dailycred.rb in dailycred-0.1.5
- old
+ new
@@ -19,11 +19,11 @@
# allows parameters to be passed through
AUTH_PARAMS = ["action","identity_provider","referrer", "access_token"]
option :authorize_options, OmniAuth::Strategies::Dailycred::AUTH_PARAMS
- uid { user['id'] }
+ uid { user['uid'] }
info do
user
end
@@ -67,9 +67,11 @@
json["identities"].each do |k, v|
@duser[k] = v
@duser[k][:access_token] = json["access_tokens"][k]
end if !json["identities"].nil?
pp @duser if options[:verbose]
+ created = json['created'] / 1000
+ @duser['created'] = DateTime.strptime(created.to_s, '%s')
@duser.delete("id")
@duser
end
\ No newline at end of file