Steam + EOS. Following the Lyra writing style, I encountered an issue with EOS login during the process.

Project Goal

We are implementing a Steam + Epic Online Services (EOS) integration where:

  • Users authenticate through Steam for local login
  • Game services use EOS for backend functionality
  • Using TryToInitializeForLocalPlay for local player initialization

Current Achievements

  • Steam authentication is working successfully (Platform context shows NetId: 76561198152391719)
  • Platform context (Steam) login completes properly
  • Game runs in Steam environment correctly

Problem Description

When using the CommonUser plugin with TryToInitializeForLocalPlay(0, FInputDeviceId(), false), the system executes multiple ProcessLoginRequest calls and hangs during the Default context auto-login, never receiving the login completion callback.

Detailed Execution Flow

Based on our debug logs, the system executes three sequential ProcessLoginRequest calls:

  1. First ProcessLoginRequest:

    • Current context: Invalid
    • Expected context: Game
    • System resolves to: Platform (since RequestedPrivilege is CanPlay)
    • Result: Success (Steam already logged in)
    • Login status: LoggedIn (2)
    • NetId: 76561198152391719
  2. Second ProcessLoginRequest:

    • Current context: Platform
    • Expected context: Game
    • System calls ResolveOnlineContext(Game) which returns Default
    • But Current != Resolved, so it continues with Platform
    • Result: Success (same Steam login)
    • Login status: LoggedIn (2)
    • Overall state set to Done
  3. Third ProcessLoginRequest:

    • Current context: Default (after context switch)
    • Expected context: Game
    • Login status: NotLoggedIn (0)
    • NetId: empty
    • System attempts AutoLogin with credentials
    • AutoLogin starts: “AutoLogin已开始,等待异步结果…”
    • AutoLogin never completes - no callback triggered

Our Implementation

We are following Lyra’s pattern exactly:

// In EchoFrontendStateComponent.cpp - exactly like Lyra
void UEchoFrontendStateComponent::HandleStartInput()
{
    if (UserSubsystem)
    {
        // Using the exact same call as Lyra
        bool bInitStarted = UserSubsystem->TryToInitializeForLocalPlay(0, FInputDeviceId(), false);
        UE_LOG(LogTemp, Log, TEXT("TryToInitializeForLocalPlay started: %s"), bInitStarted ? TEXT("true") : TEXT("false"));
    }
}

Configuration

Our project uses SteamEOS configuration (same structure as Lyra):

[OnlineSubsystem]
DefaultPlatformService=EOS
NativePlatformService=Steam
bLoadNativeOSSBeforeDefault=true

[OnlineSubsystemEOS]
bEnabled=true
bUseLocalIPs=false

[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480
SteamAppId=480

[OnlineServices]
DefaultServices=Epic

[OnlineServices.EOS]
ProductId
SandboxId
DeploymentId
ClientId
ClientSecret
These are the credentials corresponding to the applications registered on the Epic Developer Portal website.

Questions

We are wondering if our approach is correct for Steam+EOS hybrid usage:

  1. Is TryToInitializeForLocalPlay(0, FInputDeviceId(), false) the right method for Steam+EOS integration?
  2. Do we need any specific credentials or tokens for this hybrid setup?
  3. Are there any additional settings required for Steam->EOS authentication flow?
  4. Should we use a different initialization method for online services?

Root Cause Analysis

After analyzing CommonUser source code, we discovered that in CreateOnlineContexts():

// Service context callbacks are bound (lines 583-585)
ServiceContext->IdentityInterface->AddOnLoginCompleteDelegate_Handle(
    PlayerIdx, FOnLoginCompleteDelegate::CreateUObject(this, &ThisClass::HandleUserLoginCompleted, ServiceType));

// Platform context callbacks are bound (lines 594-596)
PlatformContext->IdentityInterface->AddOnLoginCompleteDelegate_Handle(
    PlayerIdx, FOnLoginCompleteDelegate::CreateUObject(this, &ThisClass::HandleUserLoginCompleted, PlatformType));

// CRITICAL: Default context has NO callbacks bound!

This means when AutoLoginOSSv1 is called on Default context, it completes but HandleUserLoginCompleted is never triggered, leaving the initialization process stuck.

Our Observation

It seems like the final goal is to get the Default context logged in with EOS, but we’re not sure if this is the correct approach. The Default context auto-login starts but never triggers a callback, so we don’t know if:

  • This is the expected behavior for Steam+EOS
  • We’re missing some configuration or credentials
  • This is a bug in CommonUser plugin

Expected Result

We expect the initialization to complete successfully, trigger HandleLoginForUserInitialize, and allow the game to proceed to the main menu with both Steam (local) and EOS (online) services available.

Debug Output Summary

[1] TryToInitializeForLocalPlay -> Platform context (Steam) - SUCCESS
[2] TryToInitializeForLocalPlay -> Platform context again - SUCCESS
[3] TryToInitializeForLocalPlay -> Default context (EOS) - STUCK (AutoLogin started, no callback)

We can provide more detailed information. If anyone has ideas or thoughts, please feel free to share.
Any guidance on Steam+EOS integration with CommonUser would be greatly appreciated!

successed in resolved it by unchecking the box :Login to EOS Auth, and use Epic Account Services