iXyles / fortnite-basic-api

Basic Fortnite API for stats with async/await, and basic communicator
MIT License
51 stars 10 forks source link

Auth error (errors.com.epicgames.accountportal.captcha_invalid) #20

Closed guyng closed 4 years ago

guyng commented 4 years ago

Hey, i'm getting auth error(it just started few days ago). errors.com.epicgames.accountportal.captcha_invalid I think there's a new field need to be added to the login request(captcha field). can you check it out?

iXyles commented 4 years ago

Hello,

No there is not a new needed field, you are getting it because of too many logged in attempts from a single IP or so.. It goes away after like 24 hours or something (unsure of the timer). They've implemented funcaptcha to prevent hijacking of accounts (so basically for a good reason). I could add support for passing in a resolver if thats something you wish, otherwise this is not something I'll be doing any change to.

Br iXyles

guyng commented 4 years ago

@iXyles Ah i see, now it make sense. what do you mean by passing in a resolver? you mean by limiting the login request count?

iXyles commented 4 years ago

By passing a resolver I mean that you can implement your own way of passing in the required captcha token that needs to be passed to the login request depending on the verdict & blob from their reputation system. Lookup "FunCaptcha" resolver and you'll maybe understand more regarding it.

guyng commented 4 years ago

By passing a resolver I mean that you can implement your own way of passing in the required captcha token that needs to be passed to the login request depending on the verdict & blob from their reputation system. Lookup "FunCaptcha" resolver and you'll maybe understand more regarding it. @iXyles Ok i see. I rather not start messing with captcha cause its a never ending story. I saw in other open source repo(fortnitepy) there are several ways to authenticate. " """Authenticates by the available data in the following order:

  1. By :class:DeviceAuth if device_id, account_id and secret are present.
  2. By :class:EmailAndPasswordAuth if email and password is present. If authentication fails because of required captcha, it then attempts to authenticate with the next step.
  3. :class:ExchangeCodeAuth is tried if exchange_code is present or if prompt_exchange_code is True. If the authentication was not done by step 1, a device auth is automatically generated and is available through :func:event_device_auth_generate. It is important to store these values somewhere since they can be used for easier logins. "

Do you think you can make a .net version of these? right now we have only option 2.

repo link: https://github.com/Terbau/fortnitepy/blob/875ad1e2f6b3da082795c8b10b00bb6075b54b62/fortnitepy/auth.py#L416

iXyles commented 4 years ago

I am working on converting this to a .NET Core already, I have just not gotten the fully time to complete it yet because of other things in life, it is sadly not something that will be done in a day or so.. but I can let you know once I am done with the basics?

guyng commented 4 years ago

I am working on converting this to a .NET Core already, I have just not gotten the fully time to complete it yet because of other things in life, it is sadly not something that will be done in a day or so.. but I can let you know once I am done with the basics?

Yes sure, i just need the basics(for 1 & 3) then i can carry on, i'd love that. Thanks and have a nice weekend :)

guyng commented 4 years ago

Hey, do you have any ETA when the basics will be ready? thanks. @iXyles

iXyles commented 4 years ago

Hey again @guyng, sadly I did not have the time to resolve those things because of real life stuff. Also that I was halted due to not finding a XMPP library which seem to work with epicgames system that is not under GPL license, since this is something I would need my self for a closed source project.

The repo is however public on my profile if you wish to see where I am, comments are in the read-me that still has to be done.

guyng commented 4 years ago

@iXyles Yes, i saw in the commits you have added todo comments "- Add support for Deviceauth login". but there's no logic for it yet. it's all good i totally understand specially these days with the corona! I actually have some free time now so ill start working on it(device auth) from tomorrow and if i get it to work ill share it public and send you a link. Cheers