passuf / WunderHabit

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

Authentication error #1

Closed n1thun closed 8 years ago

n1thun commented 8 years ago

Hi Passuf , i am trying to connect to Habitica and it throws up this error "Could not authenticate to Habitica. Please check the User ID and the API Token.". I have double checked the credentials, any suggestions. I am using the one hosted on https://wunderhabit.passuf.ch screen shot 2016-01-06 at 7 49 05 pm

passuf commented 8 years ago

@nithunx Thanks for submitting the issue! Are you sure that you entered the API credentials and not your email address / login name together with your password? You can find the User ID and API Token here.

asfaltboy commented 8 years ago

@passuf I've got the same error here, and yes I'm sure I've entered the details correctly.

For what it's worth, the API seems up and I can authenticate using python habitica client (have you considered using it btw? I can PR you)

passuf commented 8 years ago

There seems to be an error while validating the user object received from Habitica. I added some logging, would you mind to try again so I can see what exactli the problem is?

Thanks for mentioning the Python Habitica client, I might give it a try!

asfaltboy commented 8 years ago

@passuf yes sure, though I've already looked into this, and issue is the app is relying on the local key to have user details in user['auth'], but I (and I'm guessing @nithunx too) am authenticated via facebook, which is coincidentlally also the name of the key.

But I've started some work already to fix this, as well as move to the habitica lib, it comes out much cleaner; however a caveat is it seems I have to rename the app. I'll submit a PR in a little while and you can see what you think.

passuf commented 8 years ago

@asfaltboy ohh, I expected it to be something like this. Thanks a lot for looking into this, looking forward to see your PR!

asfaltboy commented 8 years ago

I'm gonna assume you merge this, and continue fixing fb from there, it'll make my life easier.

passuf commented 8 years ago

Thanks @asfaltboy and @nithunx for your help, I deployed a fix and Facebook authenticated users should now be able to connect with WunderHabit.

asfaltboy commented 8 years ago

@passuf great fix bro, I was just getting to that myself but wanted to add a test. I've rebased on your master and gonna submit the test + travis.yml as new PR now.