Skip to content

Commit

Permalink
Use custom user agent for logins
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorMcKay committed Oct 20, 2023
1 parent 6786797 commit b854d6d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion components/login.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const {chrome} = require('@doctormckay/user-agents');

const SteamCommunity = require('../index.js');

/**
Expand Down Expand Up @@ -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 () => {
Expand Down

0 comments on commit b854d6d

Please sign in to comment.