trydis / FIFA-Ultimate-Team-Toolkit

FIFA Ultimate Team Toolkit
MIT License
237 stars 111 forks source link

Login XboxOne fails (response code 401 unauthorized) #356

Closed KristianSv closed 6 years ago

KristianSv commented 7 years ago

This occurs after typing in the mail confirmation code. Thoughts?

Majed93 commented 7 years ago

400 is Bad request, you're most likely sending a bad request

KristianSv commented 7 years ago

@Majed93 I'm perfectly aware of that..... The toolkit web requests to the xbox servers needs to be updated I guess. I'll try to figure it out

KristianSv commented 7 years ago

Just tried again and now it says unauthorized. Can't seem to find an issue in the code..

KristianSv commented 7 years ago

Fixed it. Added this in LoginBase.cs

if (loginDetails.Platform == Platform.Ps4)
{
    validateResponseMessage = await HttpClient.PostAsync("https://utas.external.s2.fut.ea.com/ut/game/fifa18/phishing/validate?answer=" + Hasher.Hash(loginDetails.SecretAnswer), new FormUrlEncodedContent(
                    new[]
                    {
                        new KeyValuePair<string, string>("answer", Hasher.Hash(loginDetails.SecretAnswer))
                    }));
}
else
{
    validateResponseMessage = await HttpClient.PostAsync("https://utas.external.s3.fut.ea.com/ut/game/fifa18/phishing/validate?answer=" + Hasher.Hash(loginDetails.SecretAnswer), new FormUrlEncodedContent(
                    new[]
                    {
                        new KeyValuePair<string, string>("answer", Hasher.Hash(loginDetails.SecretAnswer))
                    }));
            }
jagarake commented 7 years ago

I get this response after 1 minute of running the program.. do i have to manually authorize after a while? EDIT: Got it to work better by adding more time between each request