Hi. I`m trying to implement login to the Epic Online Servicies by using AccountPortal method. Unfortuanaly, I have unexpected result:
- On first run of the login code I get Unreal login page in the browser with the warnings about about unsigned game (that is okay, our game is on the developement stage and is unsigned now). After passing all warning pages (presented in pictures 1,2,3 attached) I have NO ONE OnLoginComplete callback calls, even with and error. In log I recieve next Warning:
Warning: LogEOS: Error response received from backend. ServiceName=[OAuth], OperationName=[TokenGrantv2], Url=[<Redacted>], HttpStatus=[400], ErrorCode=[errors.com.epicgames.oauth.corrective_action_required], NumericErrorCode=[18206], ErrorMessage=[Corrective action is required to continue.], CorrId=[...]
- On next logins I recieve page with error about failed Pin code passing in the browser (presented at picture 4 attached). Invalid code is always the same and is filled by itself (looks like some kind of example pin code). In the OnLoginCompleteDelegate of my login code I recieve an Error:
Login(0) failed with EOS result code (EOS_Auth_PinGrantExpired)
I found next page that describes similar error. Unfortunately, suggested solution (“try to enable overlays”) was not helped. Overlays was already enabled in my code.
Please, if somebody know what may be the problem, help)
I do login in the GameInstance::Init()
, by calling next code:
//NB: Currently we support only client-side connection
if (IsDedicatedServerInstance())
return;
auto* PlatformOSS = IOnlineSubsystem::Get(TEXT("EOS"));
if (!PlatformOSS)
return;
IOnlineIdentityPtr IdentityInterface = PlatformOSS->GetIdentityInterface();
if (!IdentityInterface.IsValid())
return;
FOnlineAccountCredentials Credentials;
Credentials.Type = TEXT("accountportal");
FOnLoginCompleteDelegate OnLoginCompleteDelegate = FOnLoginCompleteDelegate::CreateWeakLambda(this,
[](int32 LocalUserNum, bool bWasSuccessful, const FUniqueNetId& UserId, const FString& Error)
{
if (!Error.IsEmpty())
return;
UE_LOG(LogTemp, Warning, TEXT("%s"), bWasSuccessful ? TEXT("Ok") : TEXT("NotOK"));
});
for (int32 Index = 0; Index < MAX_LOCAL_PLAYERS; Index++)
{
IdentityInterface->AddOnLoginCompleteDelegate_Handle(Index, OnLoginCompleteDelegate);
}
IdentityInterface->Login(0, Credentials);
This is my config (“…” replaces sensitive information):
[OnlineSubsystem]
DefaultPlatformService=EOS
NativePlatformService=EOS
[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemEOS.NetDriverEOS",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
[/OnlineSubsystemEOS]
bEnabled=true
bUseSessionPresenceAttribute=True
[/Script/OnlineSubsystemEOS.EOSSettings]
bUseEAS=false
bUseEOSConnect=true
bUseEOSSessions=true
CacheDir=CacheDir
DefaultArtifactName=...a...
DefaultArtifactNameBeta=...a..._beta
DefaultArtifactNameServer=...b...
DefaultArtifactNameServerBeta=...b..._beta
TickBudgetInMilliseconds=0
bEnableOverlay=True
bEnableSocialOverlay=True
bEnableAntiCheatConsoles=false
+Artifacts=(ArtifactName="...a...",ClientId="...",ClientSecret="...",ProductId="...",SandboxId="...",DeploymentId="...",EncryptionKey="...")
+Artifacts=(ArtifactName="...b...",ClientId="...",ClientSecret="...",ProductId="...",SandboxId="...",DeploymentId="...",EncryptionKey="...")
[OnlineServices]
DefaultServices=Null
Please help, if anybody know what may be the problem