passuf / WunderHabit

Level up in Habitica by completing todo's in Wunderlist.
MIT License
36 stars 7 forks source link

Bug: Facebook and Google authentication delivers no email or name #17

Closed passuf closed 7 years ago

passuf commented 8 years ago
[2016-01-27 17:54:40,905] [3933] [ERROR] Could not parse Habitica user with Facebook auth.
Traceback (most recent call last):
  File "wh_habitica/api.py", line 72, in get_user_details
    user_details[default.JSON_EMAIL] = auth_facebook[default.JSON_EMAIL]
KeyError: 'email'

[2016-01-27 17:54:40,906] [3933] [ERROR] Could not get user details: {'id': u'XYZ'}
Traceback (most recent call last):
  File "wh_habitica/forms.py", line 39, in clean
    self.instance.name = user_details[default.JSON_NAME]
KeyError: 'name'

Update: Same applies for accounts linked with Google.

passuf commented 7 years ago

At the moment I do not have time to fix the error, but there is a workaround:

Go to your Habitica Settings > Site where you can enable the login via credentials (by providing an email / password combination)

Now WunderHabit should be able to connect to Habitica.

passuf commented 7 years ago

The workaround should no longer be necessary, this commit should fix the problem.