change github fieldmap

define tokengetter for each provider
This commit is contained in:
Matthew Scragg 2015-11-13 17:25:55 -06:00
parent 027abd0658
commit 1e62997272
2 changed files with 7 additions and 5 deletions

View file

@ -32,7 +32,7 @@ def callback(provider):
oauth_token = resp.get(User.get_provider_value(provider, 'token_name'))
session[provider + "_token"] = (oauth_token, '')
profile = User.get_provider_value(provider, 'profile')
data = remote_app.get(profile) if profile else resp
data = remote_app.get(profile).data if profile else resp
User.auth(provider, data, oauth_token)