Added comment explaining usage of setMobileAppAccessToken

This commit is contained in:
Alex Corn 2023-06-23 01:04:48 -04:00
parent 7605dc8a41
commit d0da148d6b
No known key found for this signature in database
GPG Key ID: E51989A3E7A27FDF
2 changed files with 8 additions and 0 deletions

View File

@ -26,6 +26,10 @@ async function main() {
community.setCookies(cookies); community.setCookies(cookies);
community.setMobileAppAccessToken(accessToken); 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(); doRevoke();
}); });

View File

@ -29,6 +29,10 @@ async function main() {
community.setCookies(cookies); community.setCookies(cookies);
community.setMobileAppAccessToken(accessToken); 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(); doSetup();
}); });