Enum Class EOS_ELoginCredentialType

java.lang.Object
java.lang.Enum<EOS_ELoginCredentialType>
host.anzo.eossdk.eos.sdk.auth.enums.EOS_ELoginCredentialType
All Implemented Interfaces:
com.sun.jna.NativeMapped, Serializable, Comparable<EOS_ELoginCredentialType>, Constable

public enum EOS_ELoginCredentialType extends Enum<EOS_ELoginCredentialType> implements com.sun.jna.NativeMapped
All possible types of login methods, availability depends on permissions granted to the client.
Since:
8/5/2023
See Also:
  • Enum Constant Details

    • EOS_LCT_Password

      public static final EOS_ELoginCredentialType EOS_LCT_Password
      Login using account email address and password.

      Use of this login method is restricted and cannot be used in general.

    • EOS_LCT_ExchangeCode

      public static final EOS_ELoginCredentialType EOS_LCT_ExchangeCode
      A short-lived one-time use exchange code to login the local user.

      Typically retrieved via command-line parameters provided by a launcher that generated the exchange code for this application. When started, the application is expected to consume the exchange code by using the EOS_Auth_Login API as soon as possible. This is needed in order to authenticate the local user before the exchange code would expire. Attempting to consume an already expired exchange code will return EOS_EResult::EOS_Auth_ExchangeCodeNotFound error by the EOS_Auth_Login API.

    • EOS_LCT_PersistentAuth

      public static final EOS_ELoginCredentialType EOS_LCT_PersistentAuth
      Used by standalone applications distributed outside the supported game platforms such as Epic Games Store or Steam, and on Nintendo Switch.

      Persistent Auth is used in conjuction with the EOS_LCT_AccountPortal login method for automatic login of the local user across multiple runs of the application.

      Standalone applications implement the login sequence as follows:
      1. Application calls EOS_Auth_Login with EOS_LCT_PersistentAuth, using a previously stored Epic refresh token for an automatic user login.
      2. If automatic login fails, the application discards the Epic refresh token used as defunct, and proceeds to call EOS_Auth_Login with EOS_LCT_AccountPortal to prompt the user for manual login.

      On Desktop and Mobile platforms, the persistent refresh token is automatically managed by the SDK that stores it in the keychain of the currently logged in user of the local device. On Nintendo Switch, after a successful login the refresh token must be retrieved using the EOS_Auth_CopyUserAuthToken API and stored by the application specifically for the active Nintendo Switch user.

      See Also:
    • EOS_LCT_DeviceCode

      public static final EOS_ELoginCredentialType EOS_LCT_DeviceCode
      Not supported. Superseded by EOS_LCT_ExternalAuth login method.
      See Also:
    • EOS_LCT_Developer

      public static final EOS_ELoginCredentialType EOS_LCT_Developer
      Login with named credentials hosted by the EOS SDK Developer Authentication Tool.

      Used for development purposes only.

    • EOS_LCT_RefreshToken

      public static final EOS_ELoginCredentialType EOS_LCT_RefreshToken
      Refresh token that was retrieved from a previous call to EOS_Auth_Login API in another local process context. Mainly used in conjunction with custom desktop launcher applications.

      Can be used for example when launching the game from Epic Games Launcher and having an intermediate process in-between that requires authenticating the user before eventually starting the actual game client application. In such scenario, an intermediate launcher will log in the user by consuming the exchange code it received from the Epic Games Launcher. To allow the game client to also authenticate the user, it can copy the refresh token using the EOS_Auth_CopyUserAuthToken API and pass it via launch parameters to the started game client. The game client can then use the refresh token to log in the user.

    • EOS_LCT_AccountPortal

      public static final EOS_ELoginCredentialType EOS_LCT_AccountPortal
      Used by standalone applications distributed outside the supported game platforms such as Epic Games Store or Steam, and on Nintendo Switch.

      Login using the built-in user onboarding experience provided by the SDK, which will automatically store a persistent refresh token to enable automatic user login for consecutive application runs on the local device. Applications are expected to attempt automatic login using the EOS_LCT_PersistentAuth login method, and fall back to EOS_LCT_AccountPortal to prompt users for manual login.

      On Windows, using this login method requires applications to be started through the EOS Bootstrapper application and to have the local Epic Online Services redistributable installed on the local system. See EOS_Platform_GetDesktopCrossplayStatus for adding a readiness check prior to calling EOS_Auth_Login.

      See Also:
    • EOS_LCT_ExternalAuth

      public static final EOS_ELoginCredentialType EOS_LCT_ExternalAuth
      Login using external account provider credentials, such as PlayStation(TM)Network, Steam, and Xbox Live.

      This is the intended login method on PlayStation® and Xbox console devices. On Desktop and Mobile, used when launched through any of the commonly supported platform clients.

      The user is seamlessly logged in to their Epic account using an external account access token. If the local platform account is already linked with the user's Epic account, the login will succeed and EOS_EResult::EOS_Success is returned. When the local platform account has not been linked with an Epic account yet, EOS_EResult::EOS_InvalidUser is returned and the EOS_ContinuanceToken will be set in the EOS_Auth_LoginCallbackInfo data. If EOS_EResult::EOS_InvalidUser is returned, the application should proceed to call the EOS_Auth_LinkAccount API with the EOS_ContinuanceToken to continue with the external account login and to link the external account at the end of the login flow.

      Login flow when the platform user account has not been linked with an Epic account yet:
      1. Game calls EOS_Auth_Login with the EOS_LCT_ExternalAuth credential type.
      2. EOS_Auth_Login returns EOS_EResult::EOS_InvalidUser with a non-null EOS_ContinuanceToken in the EOS_Auth_LoginCallbackInfo data.
      3. Game calls EOS_Auth_LinkAccount with the EOS_ContinuanceToken to initiate the login flow for linking the platform account with the user's Epic account.
      4. The user is taken automatically to the Epic accounts user onboarding flow managed by the SDK.
      5. Once the user completes the login, cancels it or if the login flow times out, EOS_Auth_LinkAccount invokes the completion callback to the caller.
      - If the user was logged in successfully, EOS_EResult::EOS_Success is returned in the EOS_Auth_LoginCallbackInfo. Otherwise, an error result code is returned accordingly.

      On Windows, using this login method requires applications to be started through the EOS Bootstrapper application and to have the local Epic Online Services redistributable installed on the local system. See EOS_Platform_GetDesktopCrossplayStatus for adding a readiness check prior to calling EOS_Auth_Login.

  • Method Details

    • values

      public static EOS_ELoginCredentialType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static EOS_ELoginCredentialType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • fromNative

      public Object fromNative(Object nativeValue, com.sun.jna.FromNativeContext context)
      Specified by:
      fromNative in interface com.sun.jna.NativeMapped
    • toNative

      public Object toNative()
      Specified by:
      toNative in interface com.sun.jna.NativeMapped
    • nativeType

      public Class<?> nativeType()
      Specified by:
      nativeType in interface com.sun.jna.NativeMapped