Open Lymkin opened 5 years ago
I got authentication to work by changing the isAdmin function in "myWebServerAsync.cpp" to the following:
bool isAdmin(AsyncWebServerRequest *request)
{
if (ConfigPassword == "") return true; //not using web password (default);
bool isAuth = false;
//String realm = "*";
if (!request->authenticate(ConfigUsername.c_str(), ConfigPassword.c_str())) {
request->requestAuthentication();
isAuth = false;
}
else {
isAuth = true;
}
return isAuth;
}
It seems as though authentication does not work on the ASync version of your WebServer.