I am giving a shot at trying out EOS. I am running into an error while trying to log in. I have a product and application set up in the online dev portal. Dont know if I have everything right though. I entered all the IDs and secret values into their appropriate places in the EOS plugin area in settings.
I have this in my DefaultEngine.ini
[OnlineSubsystemEOS]
bEnabled=true
[OnlineSubsystem]
DefaultPlatformService=EOS
[/Script/Engine.GameEngine]
+NetDriverDefinitions=. (DefName="GameNetDriver",DriverClassName="OnlineSubsystemEOS.NetDriverEOS",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
[/Script/OnlineSubsystemEOS.NetDriverEOS]
bIsUsingP2PSockets=true
And this is how I am logging in
FOnlineAccountCredentials Credentials;
Credentials.Id = FString();
Credentials.Token = FString();
Credentials.Type = FString("accountportal");
Identity->OnLoginCompleteDelegates->AddUObject(this, &UEOSLibrary::OnLoginComplete);
Identity->Login(0, Credentials);
When I hit login I get a webpage that opens and asks if I want to allow access. I hit accept and what happens is the callback is never called to indicate completion. And the logs indicate that I might be missing something. What verification code and where??
LogEOSSDK: LogEOSAuth: NewClientToken: Client ClientId: xyz...kJK Access[Expires: 2022.02.22-22.32.12 Remaining: 7200.67] State: Valid
LogEOSSDK: LogEOSAuth: xyz...kJK result: eyJ...cwQ
LogEOSSDK: LogEOSAuth: Launching platform browser for account portal
LogEOSSDK: Warning: LogEOS: Error response received from backend. ServiceName=[OAuth], OperationName=[TokenGrant], Url=[<Redacted>], HttpStatus=[400], ErrorCode=[errors.com.epicgames.account.oauth.authorization_pending], NumericErrorCode=[1012], ErrorMessage=[The authorization server request is still pending as the end user has yet to visit and enter the verification code.], CorrId=[EOS-cuMGvKq4S3GvWUBNVjIbnw-ZJtD_z3YTx62TxiNJ8Yr2g-ug4LfijbR8Cx2eeMp7E3fA]
LogEOSSDK: LogEOSAuth: NewUserToken: User ClientId: xyz...kJK AccountId: 5f2...f59 Access[Expires: 2022.02.22-22.32.23 Remaining: 7200.31] Refresh[Expires: 2022-08-21T20:32:23.313Z Remaining: 15552000.31] State: Valid
LogEOSSDK: LogEOSAuth: GenerateUserAuth success
LogEOSSDK: LogEOSAuth: login/queryuserinfo success
LogEOSSDK: LogEOSAuth: Login Tasks Complete: 0
LogEOSSDK: LogEOSPresence: Updating Presence to Online. LocalUserId=[5f2...f59] RichText=[]
Turns out you cant be running the game for it to work. Which is what I was doing. Running as a standalone game I was able to successfully log in.