Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ console.log(SteamUser.formatCurrency(123.45, SteamUser.ECurrencyCode.EUR)); // 1

There are a number of options which can control the behavior of the `SteamUser` object. They are:

### accountIdentifier

A string which identifies the account. This is not the same as your SteamID.
It's used as salt for internal methods, for example when generating the machineId.

Defaults to `null`, which means internal methods will be used to select a proper identifier.

### dataDirectory

Controls where the Steam server list and machine auth token files are written. If `null`, no data will be automatically
Expand Down
3 changes: 2 additions & 1 deletion components/09-logon.js
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,8 @@ class SteamUserLogon extends SteamUserMachineAuth {
}

_getAccountIdentifier() {
return this._logOnDetails.account_name
return this.options.accountIdentifier
|| this._logOnDetails.account_name
|| this._logOnDetails._newAuthAccountName
|| this._logOnDetails._steamid.toString();
}
Expand Down
2 changes: 2 additions & 0 deletions resources/default_options.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const EMachineIDType = require('./EMachineIDType.js');

/**
* @typedef {object} OptionsObject
* @property {string|null} [accountIdentifier]
* @property {string|null} [dataDirectory]
* @property {boolean} [autoRelogin=true]
* @property {EMachineIDType} [machineIdType]
Expand All @@ -25,6 +26,7 @@ const EMachineIDType = require('./EMachineIDType.js');

module.exports = {
autoRelogin: true,
accountIdentifier: null,
machineIdType: EMachineIDType.AccountNameGenerated,
machineIdFormat: ['SteamUser Hash BB3 {account_name}', 'SteamUser Hash FF2 {account_name}', 'SteamUser Hash 3B3 {account_name}'],
enablePicsCache: false,
Expand Down