Skip to content

Commit

Permalink
get uid from misfit properly
Browse files Browse the repository at this point in the history
  • Loading branch information
eblohm committed May 14, 2016
1 parent 73087e8 commit bc091c5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/omniauth/strategies/shine.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require 'omniauth-oauth2'
require 'httparty'

module OmniAuth
module Strategies
Expand All @@ -17,7 +18,7 @@ class Shine < OmniAuth::Strategies::OAuth2


# uid { raw_info['userId'] }
uid { '12345' }
uid { raw_info['userId'] }
# info do { :firstDate => (raw_info['profile'] || {})['firstDate'] } end
info do { :foo => 'fee' } end
extra do { :raw_info => raw_info } end
Expand All @@ -32,8 +33,11 @@ def auth_hash
end

def raw_info
puts "entering raw_info"
puts "access_token.token", access_token.token
@raw_info ||= MultiJson.load(access_token.get('https://api.misfitwearables.com/move/resource/v1/user/me/profile').body)
# @raw_info ||= access_token.get('https://api.misfitwearables.com/move/v1/user/me/profile').parsed
@raw_info
#@raw_info
end

def callback_url
Expand Down

0 comments on commit bc091c5

Please sign in to comment.