增加steam
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user