I am trying to connect users to EOS by just requiring generated device id so they can easily play without account. My problem can be partially briefed as callback for EOS_Connect_CreateDeviceId is not firing anything. Additionaly, EOS_Auth_Login’s callback is not event work. I run the game on standalone-game option.
UE:4.27.2
EOS SDK: default version for UE4.27
Source page that explains what I want to do: https://dev.epicgames.com/docs/en-US/api-ref/functions/eos-connect-create-device-id
Here I found a post which claims this is a bug in UE4.27:
https://eoshelp.epicgames.com/s/article/Why-is-the-EOS-Auth-Login-callback-not-triggered?language=en_US
These codes:
EOS_Connect_CreateDeviceId(ConnectHandle, &Options, nullptr, &OnCreateDeviceIdCallback);
EOS_Auth_Login(AuthHandle, &LoginOptions, nullptr, [](const EOS_Auth_LoginCallbackInfo* Data){ /*PRINT*/});
not firing any callback.
static void OnCreateDeviceIdCallback(const EOS_Connect_CreateDeviceIdCallbackInfo* Data)
{
UE_LOG(LogTemp, Log, TEXT("-test-"));
if (Data->ResultCode == EOS_EResult::EOS_Success)
{
UE_LOG(LogTemp, Log, TEXT("Device ID successfully created."));
}
else
{
UE_LOG(LogTemp, Log, TEXT("Failed to create Device ID"));
}
}
void UEOSActorComponent::EOS_ConnectWithDeviceID(FString client_id, FString client_secret)
{
// Platform seçeneklerini ayarla
EOS_Platform_Options PlatformOptions = {};
EOS_Platform_ClientCredentials client_credentials;
client_credentials.ClientId = TCHAR_TO_ANSI(*client_id);
client_credentials.ClientSecret = TCHAR_TO_ANSI(*client_secret);
PlatformOptions.ApiVersion = EOS_PLATFORM_OPTIONS_API_LATEST;
PlatformOptions.ProductId = "**********************";
PlatformOptions.SandboxId = "*********************";
PlatformOptions.DeploymentId = "*********************";
PlatformOptions.ClientCredentials = client_credentials;
PlatformOptions.bIsServer = false;
PlatformOptions.EncryptionKey = "0000000000000000000000000000000000000000000000000000000000000000";
PlatformHandle = EOS_Platform_Create(&PlatformOptions);
if (PlatformHandle) {
UE_LOG(LogTemp, Log, TEXT("Handle created."));
ConnectHandle = EOS_Platform_GetConnectInterface(PlatformHandle);
if (ConnectHandle)
{
UE_LOG(LogTemp, Log, TEXT("CREATING DEVICE..."));
EOS_Connect_CreateDeviceIdOptions Options = {};
Options.ApiVersion = EOS_CONNECT_CREATEDEVICEID_API_LATEST;
Options.DeviceModel = "TestDeviceModel";
UE_LOG(LogTemp, Log, TEXT("CREATING DEVICE-ID..."));
EOS_Connect_CreateDeviceId(ConnectHandle, &Options, nullptr, &OnCreateDeviceIdCallback);
UE_LOG(LogTemp, Log, TEXT("DEVICE CREATED ???"));
}
else
{
UE_LOG(LogTemp, Error, TEXT("Failed to get Connect interface from EOS Platform."));
}
}
else
{
UE_LOG(LogTemp, Log, TEXT("Handle not created."));
}
}
I can see some activity on portal after I run the game in editor several times:
What I need to do?