From d0da148d6b088b7d693f87e11508217b77aa6f0c Mon Sep 17 00:00:00 2001 From: Alex Corn Date: Fri, 23 Jun 2023 01:04:48 -0400 Subject: [PATCH] Added comment explaining usage of setMobileAppAccessToken --- examples/disable_twofactor.js | 4 ++++ examples/enable_twofactor.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/examples/disable_twofactor.js b/examples/disable_twofactor.js index e03411b..98f9c90 100644 --- a/examples/disable_twofactor.js +++ b/examples/disable_twofactor.js @@ -26,6 +26,10 @@ async function main() { community.setCookies(cookies); community.setMobileAppAccessToken(accessToken); + // Enabling or disabling 2FA is presently the only action in node-steamcommunity which requires an access token. + // In all other cases, using `community.setCookies(cookies)` is all you need to do in order to be logged in, + // although there's never any harm in setting a mobile app access token. + doRevoke(); }); diff --git a/examples/enable_twofactor.js b/examples/enable_twofactor.js index a739a02..69adfda 100644 --- a/examples/enable_twofactor.js +++ b/examples/enable_twofactor.js @@ -29,6 +29,10 @@ async function main() { community.setCookies(cookies); community.setMobileAppAccessToken(accessToken); + // Enabling or disabling 2FA is presently the only action in node-steamcommunity which requires an access token. + // In all other cases, using `community.setCookies(cookies)` is all you need to do in order to be logged in, + // although there's never any harm in setting a mobile app access token. + doSetup(); });