Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

Authenticating

Vrekt edited this page May 26, 2020 · 8 revisions

Password

            athena = new Athena.Builder()
                    .email(username)
                    .password(password)
                    .build();

Device Auth

Using this method is preferred sometimes because some accounts (bots) will not be allowed to login via the normal way. But first, you have to login normally and then create a device-auth.

  1. Login normally, then once you are done execute the code below fitting them to your needs/specs.
            final var device = new Device("Type", "Model", "OS");
            // for example
            final var device = new Device("LGE", "LG-H918", "9.0");
            final var deviceAuth = athena.account().createDeviceAuth(device);
            System.err.println(deviceAuth.deviceId());
            System.err.println(deviceAuth.secret());
            System.err.println(deviceAuth.accountId());

Make sure you save accountId, deviceId and secret, these will be needed later to login.

  1. Now, logout/exit the application, then follow below to login with your new Device Auth and you are good to go!
            athena = new Athena.Builder()
                    .useDeviceAuth(accountId, deviceId, secret)
                    // insert any other options
                    .build();

XMPP

Here are recommended XMPP settings, of course you can add or change anything.

            athena = new Athena.Builder()
                    .email(username)
                    .password(password)
                    .handleShutdown()
                    .enableXmpp()
                    .reconnectOnError()
                    .platform(Platform.WIN)
                    .app("Fortnite")
                    .build();

Options

  • killOtherSessions() Allows you to kill other active sessions.
  • acceptEula() Allows you to accept the EULA on login (for new accounts)
  • kairos() Grants you a kairos token for various other services.
  • token() Allows you to set the authorization token on login.
  • handleShutdown() Will automatically create a shutdown hook and clean up on exit
  • refreshAutomatically() Will automatically re-authenticate when the access token expires
  • enableXmpp() Enables XMPP.
  • reconnectOnError() Will automatically re-connect on XMPP error (Recommended)
  • enableDebugXmpp() Outputs XMPP traffic
  • platform Sets the XMPP platform.
  • app Sets the XMPP app, valid: "launcher", "Fortnite"
Clone this wiki locally