Skip to main content

Class AuthSettings

A settings asset that configures server authentication and subject ID retrieval behavior.

public sealed class AuthSettings : Settings<AuthSettings, AuthSettingsBuildTargetCollection>

Inheritance​

Inherited Members​

Remarks​

This asset controls whether the game should fetch the subject ID from an external authorization server before allowing gameplay. The subject ID is a key identifier required for progressing in the game.

The authorization process involves:

  • Choosing whether to use a static (fallback) subject ID or retrieve it from a remote server.

  • If using remote subject ID, the game connects to the server by providing a Participant ID.

  • The Participant ID can be sourced from either:

  • The game's URL (parsed at runtime).

  • A predefined static value configured in the settings.

  • Once the Participant ID is verified by the server, a subject ID is returned and used by the game.

You can configure separate behaviors for the Editor and Player builds using AuthProfile.

Properties​

FallbackParticipantID​

Gets the fallback Participant ID if dynamic fetching is not enabled; otherwise returns null.

public string FallbackParticipantID { get; }

Property Value​

string

FallbackSubjectID​

Gets the fallback subject ID if server authorization is not required; otherwise returns -1.

public int FallbackSubjectID { get; }

Property Value​

int

RequireServerAuth​

Indicates whether the application requires server authorization to play.

public bool RequireServerAuth { get; }

Property Value​

bool

ServerAddress​

The server URL used for subject ID retrieval via client authorization.

public string ServerAddress { get; }

Property Value​

string

ShouldConnectToServer​

Indicates whether the application should connect to the server to retrieve a subject ID.

public bool ShouldConnectToServer { get; }

Property Value​

bool

ShouldFetchParticipantID​

Indicates whether the Participant ID should be retrieved dynamically (e.g., from a URL query).

public bool ShouldFetchParticipantID { get; }

Property Value​

bool

  • Remarks
  • Properties
    • FallbackParticipantID
    • FallbackSubjectID
    • RequireServerAuth
    • ServerAddress
    • ShouldConnectToServer
    • ShouldFetchParticipantID