AuthScopeFlags

AuthScopeFlags

#Overview

name: AuthScopeFlags

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

It is referenced in 5 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of AuthScopeFlags is to define the authentication scopes requested during the login process in the Epic Online Services (EOS) subsystem. This setting variable is used to specify the level of access and permissions that the application requires when authenticating users.

AuthScopeFlags is primarily used by the Online Subsystem EOS plugin, which is part of Unreal Engine’s online services infrastructure. Specifically, it is utilized in the user management and authentication components of this subsystem.

The value of this variable is set in the engine configuration file (GEngineIni) and can be modified through the project settings in the Unreal Engine editor. It is stored as an array of strings, where each string represents a specific authentication scope flag.

The AuthScopeFlags variable interacts with the EOS_EAuthScopeFlags enum, which defines the available authentication scope flags. These flags are combined using bitwise operations to create the final scope flags used in the authentication process.

Developers must be aware of the following when using this variable:

  1. The chosen auth scope flags directly impact the permissions granted to the application.
  2. Requesting unnecessary scopes may lead to users being presented with more permission requests than needed, potentially affecting user experience.
  3. Insufficient scopes may limit the functionality of the application.

Best practices when using this variable include:

  1. Only request the minimum necessary scopes for your application’s functionality.
  2. Carefully review the EOS documentation to understand the implications of each scope flag.
  3. Consider the privacy and security implications of the requested scopes.
  4. Regularly review and update the requested scopes as your application’s needs change.
  5. Ensure that the requested scopes align with your application’s privacy policy and terms of service.

#Setting Variables

#References In INI files

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

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

Location: <Workspace>/Engine/Config/BaseEngine.ini:2310, 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:195

Scope (from outer to inner):

file
function     const FEOSSettings& UEOSSettings::ManualGetSettings

Source code excerpt:

		// Artifacts explicitly skipped
		GConfig->GetArray(INI_SECTION, TEXT("TitleStorageTags"), CachedSettings->TitleStorageTags, GEngineIni);
		GConfig->GetArray(INI_SECTION, TEXT("AuthScopeFlags"), CachedSettings->AuthScopeFlags, GEngineIni);
	}

	return *CachedSettings;
}

FEOSSettings UEOSSettings::ToNative() const

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

Scope (from outer to inner):

file
function     FEOSSettings UEOSSettings::ToNative

Source code excerpt:

	Algo::Transform(Artifacts, Native.Artifacts, &FArtifactSettings::ToNative);
	Native.TitleStorageTags = TitleStorageTags;
	Native.AuthScopeFlags = AuthScopeFlags;

	return Native;
}

bool UEOSSettings::GetSelectedArtifactSettings(FEOSArtifactSettings& OutSettings)
{

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

Scope (from outer to inner):

file
namespace    anonymous
function     EOS_EAuthScopeFlags GetAuthScopeFlags

Source code excerpt:


	EOS_EAuthScopeFlags ScopeFlags = EOS_EAuthScopeFlags::EOS_AS_NoFlags;
	for (const FString& FlagsStr : Settings.AuthScopeFlags)
	{
		EOS_EAuthScopeFlags Flags;
		if (LexFromString(Flags, FlagsStr))
		{
			ScopeFlags |= Flags;
		}

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

Scope: file

Source code excerpt:

	TArray<FEOSArtifactSettings> Artifacts;
	TArray<FString> TitleStorageTags;
	TArray<FString> AuthScopeFlags;
};

UCLASS(Config=Engine, DefaultConfig)
class ONLINESUBSYSTEMEOS_API UEOSSettings :
	public URuntimeOptionsBase
{

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

Scope (from outer to inner):

file
class        class UEOSSettings : public URuntimeOptionsBase

Source code excerpt:

	/** Auth scopes to request during login */
	UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category = "EOS Settings")
	TArray<FString> AuthScopeFlags;

	/** Set to true to have Epic Accounts used (friends list will be unified with the default platform) */
	UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category="EOSPlus Login Settings", DisplayName="Use Epic Account for EOS login (requires account linking)")
	bool bUseEAS = false;

	/** Set to true to have EOS Connect APIs used to link accounts for crossplay */