From cef2fe19eee88ff9ceacb643c8efb2fc13f07d89 Mon Sep 17 00:00:00 2001 From: alemi Date: Thu, 16 Feb 2023 18:43:01 +0100 Subject: [PATCH] fix: add code field to legacy auth means nothing but makes the logic just work --- aiocraft/mc/auth/mojang.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/aiocraft/mc/auth/mojang.py b/aiocraft/mc/auth/mojang.py index 0ffb35a..ce41215 100644 --- a/aiocraft/mc/auth/mojang.py +++ b/aiocraft/mc/auth/mojang.py @@ -59,6 +59,12 @@ class MojangAuthenticator(AuthInterface): def auth_server(self) -> str: return self.auth_server_override or self.AUTH_SERVER + @property + def code(self) -> str: + if self.username and self.password: + return self.username + return "" + def serialize(self) -> Dict[str, Any]: return { "username":self.username,