Use the standard device ID when enabling 2FA

This commit is contained in:
Alexander Corn 2016-01-19 11:29:26 -05:00
parent e446cc3cd8
commit fa59b188a5

View File

@ -16,11 +16,6 @@ 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": {
@ -28,7 +23,7 @@ SteamCommunity.prototype.enableTwoFactor = function(callback) {
"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