mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-04-04 06:46:06 +00:00
switched to normal filesystem + crash fixes
This commit is contained in:
@@ -40,6 +40,11 @@ std::string GetFail(const std::string& R){
|
||||
}
|
||||
|
||||
std::string Login(const std::string& fields){
|
||||
if(fields == "LO"){
|
||||
LoginAuth = false;
|
||||
UpdateKey(nullptr);
|
||||
return "";
|
||||
}
|
||||
info("Attempting to authenticate...");
|
||||
std::string Buffer = PostHTTP("https://auth.beammp.com/userlogin", fields);
|
||||
json::Document d;
|
||||
@@ -47,6 +52,7 @@ std::string Login(const std::string& fields){
|
||||
if(Buffer == "-1"){
|
||||
return GetFail("Failed to communicate with the auth system!");
|
||||
}
|
||||
|
||||
if (Buffer.find('{') == -1 || d.HasParseError()) {
|
||||
return GetFail("Invalid answer from authentication servers, please try again later!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user