diff options
-rw-r--r-- | game/update.rpy | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/game/update.rpy b/game/update.rpy index 0463a2e..4313dd2 100644 --- a/game/update.rpy +++ b/game/update.rpy @@ -166,10 +166,10 @@ init python: status_update("Attempting Steam authentication...", 81) accId = steam.get_account_id() stdout("Steam login active, user %d" % accId) + + # Retrieve new ticket ("token"), send it in Base64 to the API steam.cancel_ticket() token = steam.get_session_ticket() - # The token is a bytearray but we want a string, so we convert it - print(base64.b64encode(token)) auth = {"accId": accId, "token": base64.b64encode(token)} time.sleep(1.0) status_update("Waiting for Vault reply...", 85) @@ -181,9 +181,9 @@ init python: raise Exception("Vault returned code %d" % r.status_code) # Receive the Vault Token - stdout("Steam result: [%d] %s" % str(r.status_code, r.text)) - auth2 = json.loads(r.text) - vaultId = auth2["accId"] + stdout("Steam result: (%d) %s" % (r.status_code, r.text)) + auth2 = r.json() + vaultId = auth2["vaultId"] vaultToken = auth2["token"] # If everything went well, inform Steam support is ON |