Kronos Matchmaking
Buy NowContact
  • About
    • Kronos LTS
    • Support
    • Accolades
  • Examples
    • Playable Demo
    • Sample Project
    • Example Content
  • Configuration
  • Testing & Debugging
  • Usage
    • Getting Started
    • Authentication
      • Authenticating Users
      • Customizing The Auth Widget
      • Creating Custom Auth Tasks
    • Matchmaking
      • Overview
      • Creating Matches
      • Starting Matchmaking
      • Canceling Matchmaking
      • Using Skill Ratings
      • Sending Match Invites
      • Joining Matches
      • Leaving Matches
    • Party
      • Overview
      • Creating Parties
      • Sending Party Invites
      • Joining Parties
      • Managing Party Players
      • Party Player Actors
      • Leaving Parties
    • Reservations
      • Overview
      • Using Reservations
      • The Host Reservation
      • Completing Reservations
    • Lobby
      • Overview
      • Lobby Setup
      • Set Players Ready
      • Lobby Player Data
      • Starting The Match
      • Updating Lobby Session
      • Leaving The Lobby
    • Widgets
  • Guides
    • Creating a Level Selector
    • Integrating with Lyra Game
    • Integrating with EIK
  • Advanced
    • Steam Sockets
    • Reconnect Parties
    • Custom Party Variables
    • Player Groups
  • Changelog
    • API Upgrades
    • Legacy
Powered by GitBook
On this page
  • Starting Authentication
  • Overriding Login Parameters
  • Authentication Widget
  • Entering The Game
  • Disable Automatic Authentication
  • Passthrough Authentication
  1. Usage
  2. Authentication

Authenticating Users

PreviousAuthenticationNextCustomizing The Auth Widget

Last updated 8 months ago

Before we can do any sort of matchmaking, we need to login with the Online Subsystem first. Kronos features an automated user authentication process, so we do not need to do anything. Authentication is entirely handled by the KronosUserManager class.

Starting Authentication

By default authentication will start automatically when the "Game Default Map" - set in your Project Settings - is opened.

You can override which map is considered as the game default map from the plugin's settings. This is useful if you want to have a dedicated "login" map.

The user will be authenticated every time when loading the game default map, even if authentication was completed before. We do this to confirm that the user didn't lose his login status while he was away (e.g. playing in a match).

Overriding Login Parameters

During authentication the user will be logged in with the Online Subsystem. Different Online Subsystems require different inputs when logging in.

The Null Online Subsystem requires a login id. By default the plugin will use the local users' id so you do not have to do anything. Works out of the box.

The Steam Online Subsystem doesn't require any inputs. Works out of the box.

To change the default login parameters, create a new blueprint from the KronosUserManager class and override the GetLoginCredentials function.

Now go to Project Settings -> Kronos Matchmaking and set the "User Manager Class" to your custom blueprint that you just created.

Authentication Widget

While authentication is in progress, a widget will be displayed showing the current auth state. During this time the user should be unable to interact with the game.

In case user authentication fails, the authentication widget will switch over to a failure screen displaying the error message to the user. From there the user can either retry authentication or quit the game.

Entering The Game

When authentication is complete, the OnEnterGame event of the KronosOnlineSession will be called. Think about this as passing the "login screen" of the game. You can display the main menu widget from here, add popups to the screen, or travel to a new map if needed.

Disable Automatic Authentication

You may want to have your authentication set up in a way that initially when the game loads, the user would have to press a key to enter the game. This is the "Press any key to continue" screen you've probably seen in a lot of games.

You can disable automatic user authentication in the plugin's settings. When disabled, the game has to call the AuthenticateUser function of the KronosUserManager manually.

The KronosOnlineSession class has a convenient OnGameDefaultMapLoaded event which you can use to handle user authentication. When the event is called, check if the user is currently authenticated and decide what to do. If the user is already authenticated, then he is returning from a match so you should authenticate to confirm his login status. If the user is not authenticated, then its the users first time loading the game which means you can wait for an input.

Passthrough Authentication

In case you want to allow a third party program or plugin to handle authentication instead of Kronos, go to Project Settings -> Kronos Matchmaking and enable "Authentication Is Passthrough". If this option is enabled, the user will not be logged in with the Online Subsystem during user authentication.

The plugin internally tracks whether the user was authenticated or not. This means that even if authentication is not handled by Kronos you will still have to call AuthenticateUser to ensure that everything work correctly.

The EOS Online Subsystem requires a login type. By default the AccountPortal login type is used. With this method, a browser window will open and the user will be asked to input their Epic account information. For more information about the different login types, please refer to the Login section of the EOS documentation: .

Please refer to the documentation page for more information about auth widget customization.

Online Subsystem EOS Plugin in Unreal Engine
Customizing The Auth Widget