From fa59b188a534471ac77deaa711d649211420c607 Mon Sep 17 00:00:00 2001 From: Alexander Corn Date: Tue, 19 Jan 2016 11:29:26 -0500 Subject: [PATCH] Use the standard device ID when enabling 2FA --- components/twofactor.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/components/twofactor.js b/components/twofactor.js index 805993c3..27fff202 100644 --- a/components/twofactor.js +++ b/components/twofactor.js @@ -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