Skip to content

Commit

Permalink
Use the standard device ID when enabling 2FA
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorMcKay committed Jan 19, 2016
1 parent e446cc3 commit fa59b18
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions components/twofactor.js
Expand Up @@ -16,19 +16,14 @@ SteamCommunity.prototype.enableTwoFactor = function(callback) {
return;
}

// Create a random device ID hash
var hash = require('crypto').createHash('sha1');
hash.update(self.steamID.getSteamID64());
hash = hash.digest('hex');

self.request.post({
"uri": "https://api.steampowered.com/ITwoFactorService/AddAuthenticator/v1/",
"form": {
"steamid": self.steamID.getSteamID64(),
"access_token": token,
"authenticator_time": Math.floor(Date.now() / 1000),
"authenticator_type": ETwoFactorTokenType.ValveMobileApp,
"device_identifier": 'android:' + hash,
"device_identifier": SteamTotp.getDeviceID(self.steamID),
"sms_phone_id": "1"
},
"json": true
Expand Down

0 comments on commit fa59b18

Please sign in to comment.