Skip to content
Snippets Groups Projects
Commit 1ac7ec10 authored by DarkGod's avatar DarkGod
Browse files

altered how steam auth works

parent 08db48c5
No related branches found
No related tags found
No related merge requests found
......@@ -100,12 +100,11 @@ function _M:start()
self:tryAuth()
self:waitFirstAuth()
elseif core.steam and self.generic.onlinesteam and self.generic.onlinesteam.autolog then
local ticket = core.steam.sessionTicket()
if ticket then
core.steam.sessionTicket(function(ticket) if ticket then
self.steam_token = ticket:toHex()
self:tryAuth()
self:waitFirstAuth()
end
end end)
end
end
......
......@@ -106,7 +106,6 @@ function _M:run()
self.logdisplay.resizeToLines = function() end
self.logdisplay:enableShadow(1)
self.logdisplay:enableFading(5)
self.log = function(...) self.logdisplay(...) end
-- Setup display
self:registerDialog(MainMenu.new())
......
......@@ -141,20 +141,21 @@ function _M:login()
end
function _M:loginSteam()
local ticket = core.steam.sessionTicket()
if not ticket then
Dialog:simplePopup("Steam", "Steam client not found.")
return
end
local d = self:simpleWaiter("Login...", "Login in your account, please wait...") core.display.forceRedraw()
profile:performloginSteam((ticket:toHex()))
profile:waitFirstAuth()
d:done()
if not profile.auth and profile.auth_last_error then
if profile.auth_last_error == "auth error" then
game:newSteamAccount()
core.steam.sessionTicket(function(ticket)
if not ticket then
Dialog:simplePopup("Steam", "Steam client not found.")
return
end
end
local d = self:simpleWaiter("Login...", "Login in your account, please wait...") core.display.forceRedraw()
profile:performloginSteam((ticket:toHex()))
profile:waitFirstAuth()
d:done()
if not profile.auth and profile.auth_last_error then
if profile.auth_last_error == "auth error" then
game:newSteamAccount()
end
end
end)
end
function _M:register()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment