Epic Online Services (EOS)
Titan integrates with Epic Online Services for production authentication.
Overview
EOS Connect provides:
- Cross-platform identity
- Integration with Epic Games Store
- Player authentication without managing passwords
Configuration
Configure EOS in appsettings.json:
{
"Eos": {
"ClientId": "your-eos-client-id",
"ClientSecret": "your-eos-client-secret",
"DeploymentId": "your-deployment-id",
"SandboxId": "your-sandbox-id"
}
}
| Setting | Description |
|---|---|
ClientId | Your EOS application client ID |
ClientSecret | Your EOS application secret |
DeploymentId | EOS deployment identifier |
SandboxId | EOS sandbox identifier |
[!IMPORTANT] In production, EOS configuration is required. The API will fail to start if EOS options are missing.
Token Validation
EosConnectService validates tokens using OpenID Connect:
- Fetches JWKS from EOS endpoints
- Validates signature using public keys
- Verifies claims (issuer, audience, expiration)
- Extracts user ID from the
subclaim
public class EosConnectService : IAuthService
{
public async Task<AuthResult> ValidateTokenAsync(string token)
{
// Validate JWT signature and claims
var validationResult = await ValidateJwtAsync(token);
if (!validationResult.IsValid)
return AuthResult.Failed("Invalid token");
var productUserId = validationResult.Claims
.First(c => c.Type == "sub").Value;
return AuthResult.Success(
Guid.Parse(productUserId),
"EOS",
["Player"]
);
}
}
User ID Mapping
EOS provides a Product User ID (PUID) which becomes the Titan Account ID:
| EOS Concept | Titan Equivalent |
|---|---|
| Product User ID | Account ID (Guid) |
| Display Name | User Profile |
| Platform Account | Linked Identity |
Development Without EOS
For local development, use the Mock provider:
{
"token": "mock:550e8400-e29b-41d4-a716-446655440000",
"provider": "Mock"
}
The Mock provider:
- Accepts any GUID after
mock: - Only available in Development environment
- Does not validate with external services
if (builder.Environment.IsDevelopment())
{
builder.Services.AddKeyedSingleton<IAuthService, MockAuthService>("Mock");
}
Unreal Engine Integration
In Unreal Engine, use the EOS SDK to get the ID token:
// Get EOS ID Token
EOS_Auth_Token* AuthToken = nullptr;
EOS_Auth_CopyIdToken(AuthHandle, &CopyOptions, &AuthToken);
// Login to Titan
FString Token = UTF8_TO_TCHAR(AuthToken->JsonWebToken);
TitanClient->Login(Token, "EOS");
See the Client SDK for the complete integration guide.
Troubleshooting
Token Validation Fails
- Check EOS credentials - Verify ClientId and ClientSecret
- Check token expiration - EOS tokens expire quickly
- Verify deployment - Use correct DeploymentId for your environment
User Not Found
EOS Product User IDs are created on first login. Ensure:
- User has linked their Epic account
- EOS Connect is configured in your product