Enterprise-level SDK for Unreal Engine / Authentication via application launcher

Authentication via application launcher

If you use Xsolla Launcher or Steam to deliver your application to users, you can automatically authenticate the user using the launcher’s credentials.

How-tos

Learn about advanced setups from our how-tos.

How to set up authorization in application via Launcher

You can use Xsolla Launcher to deliver your application to users and update it. The Launcher contains a built-in authorization tool. To avoid re-entering the username and password, set up authorization in your application via the Launcher.

Notice

To use the Launcher, you need to configure Login. Using a different authorization system is not supported.

The SDK uses the IGS API to work with the store. The Launcher uses its own API, so the SDK doesn’t support working with the Launcher store.

To set up end-to-end user authentication:
  1. Implement the Launcher authorization logic in your application.
  2. Create an application build and upload it to the Launcher.
Note
Detailed information about Launcher settings and uploading the application build is provided in the integration guide.

Implement logic for authorization via Launcher

The flow for authorization in the application via Launcher is as follows:

  1. The user is authorized in the Launcher.
  2. The user installs and runs the application.
  3. Launcher runs the application and passes user parameters via the command line. The authorization token is passed in the xsolla-login-token parameter.
  4. The application processes command line parameters and obtains a token.
  5. The application validates the received token.
  6. The application automatically authorizes the user without displaying an authorization page.

An example of the implementation of this logic is available in the W_LoginDemo blueprint of the demo project.

Note
The obtained token is used by SDK methods to open an in-game store, make a payment, etc.

Create an application build

  1. Go to your Unreal Engine project.
  2. Make sure that the SDK settings indicate the Login project ID specified in your Publisher Account in the Launcher settings (Launcher > General settings > Authentication).
  3. In the Content Browser, open the user authorization map where the token is being processed.
  4. Go to Edit > Project Settings in the main menu.
  5. Go to Project > Maps & Modes and in the Game Default Map field select the previously opened authorization map.

  1. Go to File > Package Project > Windows (64 bit) or to File > Package Project > Mac in the main menu, depending on the platform for which you are creating the build.
  2. In the pop-up window, specify the path to the directory where the finished build will be placed.
Was this article helpful?
Thank you!
Is there anything we can improve? Message
We’re sorry to hear that
Please explain why this article wasn’t helpful to you. Message
Thank you for your feedback!
We’ll review your message and use it to help us improve your experience.
Hide

How to set up native authentication via Steam

Native authentication allows players to enter your application via the installed Steam client. After setting up native authentication via Steam, you can also add payment via Steam to the application.

To set up native authentication:

  1. Set up silent authentication via Steam in Publisher Account.
  2. Configure your Unreal Engine project.
  3. Configure the processing of events.
  4. Ensure authentication via Steam.

Configure your Unreal Engine project

  1. Go to the Config catalog of your Unreal Engine project.
  2. Add the lines below to the DefaultEngine.ini file and specify your app ID in Steam for the SteamDevAppId parameter.
Copy
Full screen
Small screen
    [/Script/Engine.GameEngine]
    +NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
    
    [OnlineSubsystem]
    DefaultPlatformService=Steam
    
    [OnlineSubsystemSteam]
    bEnabled=true
    SteamDevAppId=480
    
    [/Script/OnlineSubsystemSteam.SteamNetDriver]
    NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"
    
    1. Open the project in the Unreal Editor.
    2. Go to Settings > Plugins > Online Platform.
    3. In the Online Subsystem Steam module, check the Enabled box and click the Restart Now button to save settings and reload the Unreal Editor.

    Configure processing of events

    1. The image below shows how to add nodes to the project:

      To authenticate users via Steam, you should get a session ticket via the GetSessionTicket method. Pass the received value when calling the AuthenticateWithSessionTicket method. As a result, you get the token that is used when calling the API.

    1. For additional token validation, add the ValidateToken method callback (optional).

    Ensure authentication via Steam

    1. Create the build of your Unreal Engine project for a stand-alone platform.
    2. Launch Steam and log in.
    3. Launch your application. If everything is correct, the Steam pop-up window appears.
    Was this article helpful?
    Thank you!
    Is there anything we can improve? Message
    We’re sorry to hear that
    Please explain why this article wasn’t helpful to you. Message
    Thank you for your feedback!
    We’ll review your message and use it to help us improve your experience.
    Hide
    Last updated: October 10, 2023

    Found a typo or other text error? Select the text and press Ctrl+Enter.

    Report a problem
    We always review our content. Your feedback helps us improve it.
    Provide an email so we can follow up
    Thank you for your feedback!