static void UserWebLogOn() { do { IsWebLoggedIn = steamWeb.Authenticate(myUniqueId, steamClient, myUserNonce); if (!IsWebLoggedIn) { Console.WriteLine("[" + Program.BOTNAME + "] - Authentication failed, retrying in 5s..."); Thread.Sleep(5000); } } while (!IsWebLoggedIn); //test Console.WriteLine("[" + Program.BOTNAME + "] - User Authenticated to Web!"); cookiesAreInvalid = false; // try // { // if (steamWeb.Authenticate(myUniqueId, steamClient, myUserNonce)) // { // IsWebLoggedIn = true; // Console.WriteLine("[" + Program.BOTNAME + "] - User Authenticated! "); // cookiesAreInvalid = false; // } // } // catch (Exception ex) // { // Console.WriteLine("[" + Program.BOTNAME + "] - Error on UserWebLogon: " + ex.Message); // } //} }
void UserWebLogOn() { do { IsLoggedIn = SteamWeb.Authenticate(myUniqueId, SteamClient, myUserNonce); if (!IsLoggedIn) { Log.Warn("Authentication failed, retrying in 2s..."); Thread.Sleep(2000); } } while (!IsLoggedIn); Log.Success("User Authenticated!"); cookiesAreInvalid = false; }
public bool Autenticate() { web = new SteamWeb(); web.Authenticate(cookies); if (!web.VerifyCookies()) { return(false); } api = new TradeOfferWebAPI(apiKey, web); manager = new TradeOfferManager(apiKey, web); session = new OfferSession(api, web); SteamID = new SteamID(76561198043356049); TradeOfferCheckingLoop(); return(true); }