bPreferPersistentAuth

bPreferPersistentAuth

#Overview

name: bPreferPersistentAuth

The value of this variable can be defined or overridden in .ini config files. 1 .ini config file referencing this setting variable.

It is referenced in 6 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of bPreferPersistentAuth is to control the authentication method used when logging in to the Epic Online Services (EOS) system. Specifically, it determines whether the system should prefer persistent authentication over external authentication during the login process.

This setting variable is primarily used by the Online Subsystem EOS plugin, which is part of Unreal Engine’s online services framework. It’s specifically utilized in the user management and authentication components of this subsystem.

The value of this variable is set in the engine’s configuration files, typically in the GEngineIni file. It’s read from the configuration using the GConfig->GetBool function in the UEOSSettings::ManualGetSettings method.

This variable interacts closely with other EOS-related settings, particularly bUseEAS (Use Epic Account Services). In the login process, both of these variables are checked to determine the authentication flow.

Developers should be aware that:

  1. This setting only takes effect when using Epic Account Services (bUseEAS is true).
  2. When set to true, it prioritizes persistent authentication methods, which can provide a smoother user experience but may have different security implications compared to external authentication.

Best practices when using this variable include:

  1. Carefully consider the security implications of persistent authentication for your specific use case.
  2. Ensure that the choice between persistent and external authentication aligns with your game’s overall user experience and security strategy.
  3. Test the login process thoroughly with both settings (true and false) to ensure proper functionality in all scenarios.
  4. Be aware of how this setting interacts with other EOS settings, particularly bUseEAS.

Remember that this setting is part of a larger ecosystem of online services configuration, and should be considered in that broader context when making decisions about authentication methods.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEngine.ini:2311, section: [/Script/OnlineSubsystemEOS.EOSSettings]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemEOS/Source/OnlineSubsystemEOS/Private/EOSSettings.cpp:137

Scope (from outer to inner):

file
function     FEOSSettings::FEOSSettings

Source code excerpt:

	, bEnableSocialOverlay(false)
	, bEnableEditorOverlay(false)
	, bPreferPersistentAuth(false)
	, bUseEAS(false)
	, bUseEOSConnect(false)
	, bUseEOSSessions(false)
	, bMirrorStatsToEOS(false)
	, bMirrorAchievementsToEOS(false)
	, bMirrorPresenceToEAS(false)

#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemEOS/Source/OnlineSubsystemEOS/Private/EOSSettings.cpp:186

Scope (from outer to inner):

file
function     const FEOSSettings& UEOSSettings::ManualGetSettings

Source code excerpt:

		GConfig->GetBool(INI_SECTION, TEXT("bEnableSocialOverlay"), CachedSettings->bEnableSocialOverlay, GEngineIni);
		GConfig->GetBool(INI_SECTION, TEXT("bEnableEditorOverlay"), CachedSettings->bEnableEditorOverlay, GEngineIni);
		GConfig->GetBool(INI_SECTION, TEXT("bPreferPersistentAuth"), CachedSettings->bPreferPersistentAuth, GEngineIni);
		GConfig->GetBool(INI_SECTION, TEXT("bUseEAS"), CachedSettings->bUseEAS, GEngineIni);
		GConfig->GetBool(INI_SECTION, TEXT("bUseEOSConnect"), CachedSettings->bUseEOSConnect, GEngineIni);
		GConfig->GetBool(INI_SECTION, TEXT("bUseEOSSessions"), CachedSettings->bUseEOSSessions, GEngineIni);
		GConfig->GetBool(INI_SECTION, TEXT("bMirrorStatsToEOS"), CachedSettings->bMirrorStatsToEOS, GEngineIni);
		GConfig->GetBool(INI_SECTION, TEXT("bMirrorAchievementsToEOS"), CachedSettings->bMirrorAchievementsToEOS, GEngineIni);
		GConfig->GetBool(INI_SECTION, TEXT("bMirrorPresenceToEAS"), CachedSettings->bMirrorPresenceToEAS, GEngineIni);

#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemEOS/Source/OnlineSubsystemEOS/Private/EOSSettings.cpp:218

Scope (from outer to inner):

file
function     FEOSSettings UEOSSettings::ToNative

Source code excerpt:

	Native.bEnableSocialOverlay = bEnableSocialOverlay;
	Native.bEnableEditorOverlay = bEnableEditorOverlay;
	Native.bPreferPersistentAuth = bPreferPersistentAuth;
	Native.bUseEAS = bUseEAS;
	Native.bUseEOSConnect = bUseEOSConnect;
	Native.bUseEOSSessions = bUseEOSSessions;
	Native.bMirrorStatsToEOS = bMirrorStatsToEOS;
	Native.bMirrorAchievementsToEOS = bMirrorAchievementsToEOS;
	Native.bMirrorPresenceToEAS = bMirrorPresenceToEAS;

#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemEOS/Source/OnlineSubsystemEOS/Private/UserManagerEOS.cpp:415

Scope (from outer to inner):

file
function     bool FUserManagerEOS::Login

Source code excerpt:

	if (!EOSSubsystem->bIsDefaultOSS && !EOSSubsystem->bIsPlatformOSS && Settings.bUseEAS)
	{
		if (Settings.bPreferPersistentAuth)
		{
			LoginViaPersistentAuth(LocalUserNum, AccountCredentials);
		}
		else
		{
			LoginViaExternalAuth(LocalUserNum, AccountCredentials);

#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemEOS/Source/OnlineSubsystemEOS/Public/EOSSettings.h:78

Scope: file

Source code excerpt:

	bool bEnableSocialOverlay;
	bool bEnableEditorOverlay;
	bool bPreferPersistentAuth;
	bool bUseEAS;
	bool bUseEOSConnect;
	bool bUseEOSSessions;
	bool bMirrorStatsToEOS;
	bool bMirrorAchievementsToEOS;
	bool bMirrorPresenceToEAS;

#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemEOS/Source/OnlineSubsystemEOS/Public/EOSSettings.h:131

Scope (from outer to inner):

file
class        class UEOSSettings : public URuntimeOptionsBase

Source code excerpt:

	/** Set to true to prefer persistent auth over external authentication during Login */
	UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category="EOS Settings")
	bool bPreferPersistentAuth = false;

	/** Tag combinations for paged queries in title file enumerations, separate tags within groups using `+` */
	UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category="EOS Settings")
	TArray<FString> TitleStorageTags;

	/** Chunk size used when reading a title file */