Master Data Reference of GS2-Account

Reference of the format of master data and various models to be imported

Master Data Format

{
  "version": "2024-07-30",
  "takeOverTypeModels": [
    {
      "type": "[int]Slot Number",
      "metadata": "[string?]Metadata",
      "openIdConnectSetting": {
        "configurationPath": "[string]OpenID Connect Configuration URL",
        "clientId": "[string]Client ID",
        "clientSecret": "[string]Client Secret",
        "appleTeamId": "[string]Team ID of Apple Developer",
        "appleKeyId": "[string]Key ID registered with Apple",
        "applePrivateKeyPem": "[string]Private Key received from Apple",
        "doneEndpointUrl": "[string?]URL to transition to when authentication is complete",
        "additionalScopeValues": [
          {
            "key": "[string]Name",
            "value": "[string?]Value"
          }
        ],
        "additionalReturnValues": [
          "[string]Additional return values obtained with OpenId Connect"
        ]
      }
    }
  ]
}
TypeConditionRequiredDefaultValue LimitsDescription
versionstring
2024-07-30Format version of master data
takeOverTypeModelsList<TakeOverTypeModel>~ 1000 itemsTakeover Information Type Model
This model defines Takeover Information.

Takeover Information is used when changing devices or moving/sharing an account across platforms.
It consists of a unique string that identifies an individual and a password; by entering the correct combination, an Account (anonymous account) can be retrieved.

Multiple sets of Takeover Information can be configured for a single Account.
To configure multiple sets, you must assign each one to a different slot.
Slots can be specified from 0 to 1024, allowing for up to 1,025 types of Takeover Information to be set.

A typical example would be to store the account information for “Sign in with Apple” in slot 0 and the information for a Google account in slot 1.
It should be noted that this Takeover Information serves only as a data holder; the authentication mechanism for social accounts must be prepared separately.

Model

TakeOverTypeModel

Takeover Information Type Model

This model defines Takeover Information.

Takeover Information is used when changing devices or moving/sharing an account across platforms. It consists of a unique string that identifies an individual and a password; by entering the correct combination, an Account (anonymous account) can be retrieved.

Multiple sets of Takeover Information can be configured for a single Account. To configure multiple sets, you must assign each one to a different slot. Slots can be specified from 0 to 1024, allowing for up to 1,025 types of Takeover Information to be set.

A typical example would be to store the account information for “Sign in with Apple” in slot 0 and the information for a Google account in slot 1. It should be noted that this Takeover Information serves only as a data holder; the authentication mechanism for social accounts must be prepared separately.

TypeConditionRequiredDefaultValue LimitsDescription
takeOverTypeModelIdstring
✓*
~ 1024 charsTakeover Type Model GRN
* Required (system-assigned)
typeint
0 ~ 1024Slot Number
metadatastring~ 2048 charsMetadata
Arbitrary values can be set in the metadata.
Since they do not affect GS2’s behavior, they can be used to store information used in the game.
openIdConnectSettingOpenIdConnectSetting
OpenID Connect Configuration

OpenIdConnectSetting

OpenID Connect Configuration

By registering the settings of an OpenID Connect compliant IdP, you can use IdP integration as account transfer information.

TypeConditionRequiredDefaultValue LimitsDescription
configurationPathstring
~ 1024 charsOpenID Connect Configuration URL
clientIdstring
~ 1024 charsClient ID
clientSecretstring{configurationPath} != “https://appleid.apple.com/.well-known/openid-configuration”
✓*
~ 1024 charsClient Secret
* clientSecret is required when the configurationPath is not “https://appleid.apple.com/.well-known/openid-configuration”, i.e., for other IdP integrations.
appleTeamIdstring{configurationPath} == “https://appleid.apple.com/.well-known/openid-configuration”
✓*
~ 1024 charsTeam ID of Apple Developer
* Required if configurationPath is “https://appleid.apple.com/.well-known/openid-configuration”
appleKeyIdstring{configurationPath} == “https://appleid.apple.com/.well-known/openid-configuration”
✓*
~ 1024 charsKey ID registered with Apple
* Required if configurationPath is “https://appleid.apple.com/.well-known/openid-configuration”
applePrivateKeyPemstring{configurationPath} == “https://appleid.apple.com/.well-known/openid-configuration”
✓*
~ 10240 charsPrivate Key received from Apple
* Required if configurationPath is “https://appleid.apple.com/.well-known/openid-configuration”
doneEndpointUrlstring~ 1024 charsURL to transition to when authentication is complete
If not specified, it will transition to /authorization/done.
id_token is attached to the Query String.
additionalScopeValuesList<ScopeValue>[]0 ~ 10 itemsAdditional scopes obtained with OpenId Connect
additionalReturnValuesList<string>[]0 ~ 10 itemsAdditional return values obtained with OpenId Connect

ScopeValue

Scope value

TypeConditionRequiredDefaultValue LimitsDescription
keystring
~ 64 charsName
valuestring~ 51200 charsValue