Use custom user agent for logins

This commit is contained in:
Alex Corn 2023-10-20 00:39:49 -04:00
parent 67867978f8
commit b854d6d4d4
No known key found for this signature in database
GPG Key ID: E51989A3E7A27FDF

View File

@ -1,3 +1,5 @@
const {chrome} = require('@doctormckay/user-agents');
const SteamCommunity = require('../index.js');
/**
@ -41,7 +43,10 @@ SteamCommunity.prototype._modernLogin = function(logOnDetails) {
logOnDetails.disableMobile
? EAuthTokenPlatformType.WebBrowser
: EAuthTokenPlatformType.MobileApp,
{localAddress: this._options.localAddress}
{
localAddress: this._options.localAddress,
userAgent: this._options.userAgent || chrome()
}
);
session.on('authenticated', async () => {