> ## Documentation Index
> Fetch the complete documentation index at: https://docs.launcherforge.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Unreal Engine

> Validate LauncherForge launch tokens in an Unreal Engine game.

# Unreal Engine authentication

The LauncherForge Unreal Engine integration verifies that a player started the game from an authorized launcher session.

## Launch contract

LauncherForge starts the packaged game with a launch token:

```text theme={null}
MyGame.exe --launchToken=TOKEN
```

Treat the token as temporary authentication material. Do not print it in production logs or store it permanently.

## Validation flow

<Steps>
  <Step title="Initialize the integration">
    Initialize the LauncherForge authentication logic from your Game Instance or startup flow.
  </Step>

  <Step title="Allow startup arguments to become available">
    Keep the recommended `0.5` second startup delay before validation.
  </Step>

  <Step title="Validate asynchronously">
    Call the plugin's asynchronous launch-token validation node.
  </Step>

  <Step title="Handle the result">
    Continue only when the returned session is valid.
  </Step>
</Steps>

<Warning>
  Removing the recommended startup delay can cause validation to run before the packaged process has completed its startup state, producing inconsistent results.
</Warning>

## Expected data

A successful validation provides the player data required by the integration:

```json theme={null}
{
  "id": "player-id",
  "email": "player@example.com",
  "valid": true
}
```

Use `id` as the stable player identifier. Do not use the email address as the primary database key.

## Development and Shipping

* Development builds can display additional status information.
* Shipping builds should not expose token overrides.
* Do not depend only on visible console logs in Shipping.
* Provide a controlled fallback screen when authentication fails.

## Failure handling

When validation fails:

* Block protected online actions.
* Show a clear message asking the player to start the game from LauncherForge.
* Allow a safe retry when the launcher session may still be initializing.
* Never expose the raw token in the error message.
