增加steam

This commit is contained in:
yaoyanwei
2025-08-11 15:00:21 +08:00
parent 8fda4168b3
commit 65ee6c6eeb
288 changed files with 34032 additions and 27 deletions

View File

@@ -152,6 +152,25 @@ namespace TcgEngine
onLogin?.Invoke(login_res);
return login_res;
}
public async Task<LoginResponse> SteamLogin(string email, string username, string password)
{
Logout(); //Disconnect
LoginRequest data = new LoginRequest();
data.email = email;
data.username = username;
data.password = password;
string url = ServerURL + "/auth/steam";
string json = ApiTool.ToJson(data);
WebResponse res = await SendPostRequest(url, json);
LoginResponse login_res = GetLoginRes(res);
AfterLogin(login_res);
onLogin?.Invoke(login_res);
return login_res;
}
public async Task<LoginResponse> RefreshLogin()
{