When calling `FOnlineIdentitySteam::GetLinkedAccountAuthToken` without an internet connection, there is a codepath that fails to fire the provided callback delegate. We were able to fix this locally by updating the above function with the code below:
```
else if (TokenType.StartsWith(WebAPITokenType))
{
if (SteamUserPtr !\= NULL \&\& SteamUserPtr\-\>BLoggedOn())
{
// \<code omitted for brevity\>
}
// DIVERGENCE\_START
else
{
UE\_LOG\_ONLINE\_IDENTITY(
Warning, TEXT("FOnlineIdentitySteam::GetLinkedAccountAuthToken SteamUser not valid, or user is not logged in!"));
Delegate.ExecuteIfBound(LocalUserNum, false, FExternalAuthToken());
}
// DIVERGENCE\_END
}
```
Steps to Reproduce
Add a call to `GetLinkedAccountAuthToken` with a `WebAPI` specifier in the TokenType parameter:
```
if (IOnlineSubsystem* OnlineSub = Online::GetSubsystem(GetWorld()))
{
if (IOnlineIdentityPtr IdentityInterface = OnlineSub->GetIdentityInterface())
{
IOnlineIdentity::FOnGetLinkedAccountAuthTokenCompleteDelegate Callback;
Callback.BindUObject(this, \&ThisClass::OnGetLinkedAccountAuthToken);
OnlineSub\-\>GetIdentityInterface()\-\>GetLinkedAccountAuthToken(
0, FString("WebAPI:asdf"), Callback);
}
}
```
While signed in to steam on your local device, locally disable your internet connection (e.g. turn off wi-fi or unplug ethernet) and then launch your executable, which will execute the above code.
Notice that `if (SteamUserPtr != NULL && SteamUserPtr->BLoggedOn())` returns false and the bound callback never fires
Hi,
Thank you for the report and the proposed fix!
I’ve been able to reproduce this in my own test project, and I’ve opened a new issue, UE-330775, which should be visible in the public tracker in a day or so.
Thanks,
Alex