Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login fails with 400 (Bad request) #25

Closed
olibertos opened this issue Mar 21, 2023 · 4 comments
Closed

Login fails with 400 (Bad request) #25

olibertos opened this issue Mar 21, 2023 · 4 comments

Comments

@olibertos
Copy link

olibertos commented Mar 21, 2023

When attempting to initially login with an Epic Games account using the select-apps option, it produces the following output:
:~/EpicPrefill-1.1.0-linux-x64$ ./EpicPrefill select-apps
[1:28:40 PM] Please login into Epic via your browser
[1:28:40 PM] If the web page did not open automatically, please manually open the following URL: https://legendary.gl/epiclogin
Please enter the authorizationCode from the JSON response: [redacted]
System.Net.Http.HttpRequestException: Response status code does not indicate success: 400 (Bad Request).
at HttpResponseMessage System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at async Task EpicPrefill.Handlers.UserAccountManager.LoginAsync()
at async Task EpicPrefill.EpicGamesManager.InitializeAsync()
at async ValueTask EpicPrefill.CliCommands.SelectAppsCommand.ExecuteAsync(IConsole console)

I will update when I find out if the account has any additional MFA or other limitations that may be out of the ordinary.
When using a different account, login worked successfully.

Discord name: Ed/Megabeard

@Donkeykong307
Copy link

Did you copy the whole json response or JUST the authorizationCode?

At first i copied the whole json response and i got the same error, but when i just copied the code, i got logged in.

@Chillipek
Copy link

I had same error. Tried once again logging to https://legendary.gl/epiclogin and new code worked fine

@tpill90
Copy link
Owner

tpill90 commented Aug 8, 2023

I believe that there may be more than one scenario causing issues here:

  • If an auth token and the refresh token have expired, then a refreshed token can't be requested. Need to do initial login flow instead.
  • If refresh token has been requested, but the new token wasn't saved for any reason (app crashed, system crashed, container crashed), then a refreshed token can't be requested. Need to do the initial login flow as well.

@tpill90
Copy link
Owner

tpill90 commented Aug 9, 2023

Fix released in v1.2.0

@tpill90 tpill90 closed this as completed Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants