{"action":"closed","issue":{"url":"https://api.github.com/repos/DoctorMcKay/node-steam-user/issues/32","labels_url":"https://api.github.com/repos/DoctorMcKay/node-steam-user/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/DoctorMcKay/node-steam-user/issues/32/comments","events_url":"https://api.github.com/repos/DoctorMcKay/node-steam-user/issues/32/events","html_url":"https://github.com/DoctorMcKay/node-steam-user/issues/32","id":121571466,"number":32,"title":"Steam Guard App Code required when logging in frequently","user":{"login":"timavo","id":10407764,"avatar_url":"https://avatars.githubusercontent.com/u/10407764?v=3","gravatar_id":"","url":"https://api.github.com/users/timavo","html_url":"https://github.com/timavo","followers_url":"https://api.github.com/users/timavo/followers","following_url":"https://api.github.com/users/timavo/following{/other_user}","gists_url":"https://api.github.com/users/timavo/gists{/gist_id}","starred_url":"https://api.github.com/users/timavo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timavo/subscriptions","organizations_url":"https://api.github.com/users/timavo/orgs","repos_url":"https://api.github.com/users/timavo/repos","events_url":"https://api.github.com/users/timavo/events{/privacy}","received_events_url":"https://api.github.com/users/timavo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-10T20:33:56Z","updated_at":"2015-12-10T22:14:34Z","closed_at":"2015-12-10T22:14:34Z","body":"Hi, \r\n\r\nwhen I login and logout frequently (eg. login, logout and instantly login again), the console is asking for a `Steam Guard App Code`. \r\n\r\nThe code I am using:\r\n\r\n```\r\nvar SteamUser = require('steam-user');\r\nvar SteamTotp = require('steam-totp'); \r\n\r\nvar client = new SteamUser();\r\n\r\nclient.logOn({\r\n    accountName: 'username',\r\n    password: 'password',\r\n    twoFactorCode: SteamTotp.generateAuthCode('my_shared_secret')\r\n});\r\n```\r\n\r\nSo generally this is working, but not if I am logging in and out frequently. \r\n\r\nI also tried with:\r\n\r\n```\r\nvar client = new SteamUser({\r\n    promptSteamGuardCode: false\r\n});\r\n\r\nclient.on('steamGuard', function (domain, callback) {\r\n    console.log(\"Steam Guard code needed from \" + (domain ? \"email ending in \" + domain : \"app\") + \".\");\r\n    var code = SteamTotp.generateAuthCode('my_shared_secret')\r\n    callback(code);\r\n});\r\n```\r\n\r\nBut this doesn't work. The code seems to be wrong... \r\n\r\nAny help is very much appreciated.\r\n"}}