FIFA-Ultimate-Team-Toolkit icon indicating copy to clipboard operation
FIFA-Ultimate-Team-Toolkit copied to clipboard

chooses wrong authtype

Open Kooszi opened this issue 7 years ago • 2 comments

it chooses always authtype = APP if you've setup both

Kooszi avatar Oct 04 '17 00:10 Kooszi

Can you please share the code how you setup both auth types?

tringler avatar Oct 04 '17 07:10 tringler

` protected async Task<HttpResponseMessage> SetTwoFactorTypeAsync(HttpResponseMessage mainPageResponseMessage) { var loginResponseMessage = new HttpResponseMessage(); var contentData = string.Empty;

        if (_authType == AuthenticationType.Email)
        {
            loginResponseMessage = await HttpClient.PostAsync(mainPageResponseMessage.RequestMessage.RequestUri, new FormUrlEncodedContent(
                                                                                                                        new[]
                                                                                                                        {
                                                                                                                        new KeyValuePair<string, string>("_eventId", "submit"),
                                                                                                                        }));
        }
        else
        {
            loginResponseMessage = await HttpClient.PostAsync(mainPageResponseMessage.RequestMessage.RequestUri, new FormUrlEncodedContent(
                                                                                                                        new[]
                                                                                                                        {
                                                                                                                        new KeyValuePair<string, string>("_eventId", "submit"),
                                                                                                                        new KeyValuePair<string, string>("codeType", "APP"),
                                                                                                                        }));
        }

        return loginResponseMessage;
    }`

it'd need an addition of "codeType=EMAIL&_eventId=submit" cause at current state it wont work when you've setup both auth types

Kooszi avatar Oct 04 '17 15:10 Kooszi