OpenXbox / xbox-webapi-python

A python library to authenticate with Xbox Live via your Microsoft Account and provides Xbox related Web-API.
https://pypi.python.org/pypi/xbox-webapi
MIT License
175 stars 44 forks source link

Authentication with special characters not working #13

Closed Bird87ZA closed 4 years ago

Bird87ZA commented 4 years ago

It seems like the api is changing special characters. If I run xbox-authenticate the below happens:

user:~$ xbox-authenticate --email test@example.com --password MyPass^!7*
xbox-authenticate --email test@example.com --password MyPass^-V
Email/Password authentication failed! Err: Could not log in with supplied credentials

What could be the cause? Or should I escape the password?

kufhjer commented 4 years ago

Encode your password before doing the authentication.

Bird87ZA commented 4 years ago

Encode how? Just base64?

Bird87ZA commented 4 years ago

Tried Base64 and a urlencode and both still fail.

kufhjer commented 4 years ago

Strange, I use url encode and mine is working. Unable to check my code until Sunday as I am on holiday.

Bird87ZA commented 4 years ago

No worries. I'll continue trying until I figure it out.

If I figure it out before Sunday, will post here. Perhaps something I'll add to the docs just so everyone knows :)

Bird87ZA commented 4 years ago

Just an update on this. I encode my password and get this: MyPass%5E%217%2A

Then I run: xbox-authenticate --email test@example.com --password MyPass%5E%217%2A

And it still throws: Email/Password authentication failed! Err: Could not log in with supplied credentials

When I use a buddy's login that has no special characters, it works 100% fine.

tuxuser commented 4 years ago

Try like this:

xbox-authenticate --email test@example.com --password "MyPass^!7*"
xbox-authenticate --email test@example.com --password 'MyPass^!7*'
Bird87ZA commented 4 years ago

Putting it in single apostrophes worked. Thanks