So i want players to login from steam and authenticate with steam account (EOSGS only) but have the option to link their epic account (full EOS with EAS).
I am targeting the new v2 code-paths, and the “idiomatic” way to login now is using the GameService:
TSharedPtr<IOnlineServices> OnlineService = GetServices(EOnlineServices::EpicGame or EOnlineServices::EpicAccount);
OnlineService->GetAuthInterface()->Login(...);
the problem is that there are no valid services under these enum options
there is only the EAS service registered under EOnlineServices::Epic
.
There is NO dynamic way to choose the login path, and calling login on the EAS service will force you to link an epic account
I did hackily get around this by manually registering the services to their respective enums:
UE::Online::FOnlineServicesRegistry::Get().RegisterServicesFactory(UE::Online::EOnlineServices::EpicGame, MakeUnique<FEpicGameServiceFactory>(), 0);
UE::Online::FOnlineServicesRegistry::Get().RegisterServicesFactory(UE::Online::EOnlineServices::EpicAccount, MakeUnique<FEpicAccountServiceFactory>(), 0);
However this causes some other failure in the EOSGS login flow and I suspect it is because I am registering these.