AuthenticationMethods
Device ID
Anonymous authentication using a unique device identifier
Device ID authentication creates an anonymous account tied to the device. No login UI required - perfect for testing and guest accounts.
When to Use
- Quick prototyping and testing
- Guest/anonymous player accounts
- Games that don't need persistent identity
Device ID accounts are local to the device. Players lose progress if they switch devices or reinstall.
Implementation
Use Login Using Connect Interface with Device ID type:

Copy and paste into Unreal Engine Blueprint editor
Display Name cannot be empty.
The EIKCore abstraction layer provides a unified API that works with both Online Subsystem and Online Services:
#include "Interfaces/IEIKAuth.h"
void UMyClass::LoginWithDeviceID()
{
IEIKAuth* Auth = GetIEIKAuth();
if (!Auth) return;
FEIKLoginCredentials Credentials = FEIKLoginCredentials::DeviceIdLogin(TEXT("PlayerName"));
Auth->LoginConnect(0, Credentials,
[this](const TEIKAsyncResult<FEIKLoginResult>& Result)
{
if (Result.IsSuccessful())
{
const FEIKLoginResult& LoginResult = Result.GetValue();
UE_LOG(LogTemp, Log, TEXT("Login successful! AccountId: %s"),
*LoginResult.AccountId.ToString());
}
else
{
UE_LOG(LogTemp, Error, TEXT("Login failed: %s"),
*Result.GetError().ErrorMessage);
}
});
}PrivateDependencyModuleNames.Add("EIKCore");Modern approach for UE 5.2+ using the Online Services API:
#include "Online/OnlineServices.h"
#include "Online/Auth.h"
using namespace UE::Online;
void UMyClass::LoginWithDeviceID()
{
IOnlineServicesPtr Services = GetServices(EOnlineServices::Epic);
if (!Services.IsValid()) return;
IAuthPtr Auth = Services->GetAuthInterface();
if (!Auth.IsValid()) return;
FAuthLogin::Params Params;
Params.PlatformUserId = FPlatformMisc::GetPlatformUserForUserIndex(0);
Params.CredentialsType = FName(TEXT("EIK_Connect_DeviceId"));
Params.CredentialsToken = TVariant<FString, FExternalAuthToken>(
TInPlaceType<FString>(), TEXT("PlayerName"));
Auth->Login(MoveTemp(Params)).OnComplete(
[this](const TOnlineResult<FAuthLogin>& Result)
{
if (Result.IsOk())
{
const FAccountInfo& Account = *Result.GetOkValue().AccountInfo;
UE_LOG(LogTemp, Log, TEXT("Login successful!"));
}
else
{
UE_LOG(LogTemp, Error, TEXT("Login failed: %s"),
*Result.GetErrorValue().GetLogString());
}
});
}PrivateDependencyModuleNames.AddRange(new string[] { "OnlineServicesInterface", "OnlineServicesEIK" });Legacy approach using the Online Subsystem interface:
#include "OnlineSubsystem.h"
#include "Interfaces/OnlineIdentityInterface.h"
void UMyClass::LoginWithDeviceID()
{
IOnlineSubsystem* OnlineSub = IOnlineSubsystem::Get(FName(TEXT("EIK")));
if (!OnlineSub) return;
IOnlineIdentityPtr Identity = OnlineSub->GetIdentityInterface();
if (!Identity.IsValid()) return;
// Device ID Connect-only login
FOnlineAccountCredentials Credentials;
Credentials.Type = TEXT("noeas_+_deviceid");
Identity->AddOnLoginCompleteDelegate_Handle(0,
FOnLoginCompleteDelegate::CreateLambda(
[](int32 LocalUserNum, bool bSuccess, const FUniqueNetId& UserId, const FString& Error)
{
if (bSuccess)
{
UE_LOG(LogTemp, Log, TEXT("Login successful! UserId: %s"), *UserId.ToString());
}
else
{
UE_LOG(LogTemp, Error, TEXT("Login failed: %s"), *Error);
}
}));
Identity->Login(0, Credentials);
}PrivateDependencyModuleNames.AddRange(new string[] { "OnlineSubsystem", "OnlineSubsystemEIK" });Parameters
| Parameter | Required | Description |
|---|---|---|
| Display Name | Yes | The player's display name (cannot be empty) |