Skip to content

Epic Games

This how-to walks you through configuring Sign in with Epic Games and starting an Epic Games session from your game. Both Epic Games Sign In and Epic Games Connect are supported.

Prerequisites

  • Unity, Unreal, or Godot SDK installed and configured in your project (not required for REST).
  • An Epic Games developer account with access to the Epic Dev Console.

Configuration

Configure your integration in Platform Settings.

Epic Games platform settings in the Web Console

Client ID: retrieve this from the Epic Dev Console. If you don't have a client, create one.

Start Session

Acquire an Epic Identity Token, then use it to start a session. The response includes a refresh token, which lets you refresh the session without repeating the full sign-in flow.

string idToken = "eyJhbGciOiJSUz............";
LootLockerSDKManager.StartEpicSession(idToken, (response) =>
{
if (!response.success)
{
Debug.Log("error starting LootLocker session");
return;
}
Debug.Log("session started successfully");
// Store these if you want to manually supply it to refresh the session without using the full sign in flow
string refreshToken = response.refresh_token;
});

Refresh Session

Refresh the session instead of having the player go through the full sign-in flow every time. The request returns a 401 (Unauthorized) if the refresh token has expired, in which case start a new session instead.

LootLockerSDKManager.RefreshEpicSession((response) =>
{
if (!response.success)
{
if (response.statusCode == 401) {
// Refresh token has expired, use StartEpicGamesSession
}
else {
Debug.Log("error starting LootLocker session");
}
return;
}
Debug.Log("session started successfully");
// Store these if you want to manually supply it to refresh the session without using the full sign in flow
string refreshToken = response.refresh_token;
});

Conclusion

You've started using LootLocker in your game with Sign in with Epic Games. Next, review LootLocker's full feature set to decide which other features to implement.