u
This commit is contained in:
@@ -57,7 +57,9 @@
|
|||||||
// check server response
|
// check server response
|
||||||
if (authenticatorAttestationServerResponse.success) {
|
if (authenticatorAttestationServerResponse.success) {
|
||||||
reloadServerPreview();
|
reloadServerPreview();
|
||||||
window.alert(authenticatorAttestationServerResponse.msg || 'login success');
|
//window.alert(authenticatorAttestationServerResponse.msg || 'login success');
|
||||||
|
//auth success, send to index
|
||||||
|
window.location.href = "/system/secure_zone/php/index.php";
|
||||||
} else {
|
} else {
|
||||||
throw new Error(authenticatorAttestationServerResponse.msg);
|
throw new Error(authenticatorAttestationServerResponse.msg);
|
||||||
}
|
}
|
||||||
@@ -76,7 +78,9 @@
|
|||||||
if (json.success) {
|
if (json.success) {
|
||||||
window.alert(json.msg);
|
window.alert(json.msg);
|
||||||
} else {
|
} else {
|
||||||
throw new Error(json.msg);
|
if(json.msg=="User does not exist"){
|
||||||
|
alert("User does not exist!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}).catch(function(err) {
|
}).catch(function(err) {
|
||||||
window.alert(err.message || 'unknown error occured');
|
window.alert(err.message || 'unknown error occured');
|
||||||
|
|||||||
@@ -374,6 +374,13 @@ try {
|
|||||||
$WebAuthn->processGet($clientDataJSON, $authenticatorData, $signature, $credentialPublicKey, $challenge, null, $userVerification === 'required');
|
$WebAuthn->processGet($clientDataJSON, $authenticatorData, $signature, $credentialPublicKey, $challenge, null, $userVerification === 'required');
|
||||||
|
|
||||||
// Authentication success
|
// Authentication success
|
||||||
|
//set sessionso user is authenticated
|
||||||
|
$_SESSION["username"]=$row["username"];
|
||||||
|
$_SESSION["login"]=true;
|
||||||
|
$_SESSION["perms"]=$row["perms"];
|
||||||
|
$_SESSION["email"]=$row["email"];
|
||||||
|
$_SESSION["telegram_id"]=$row["telegram_id"];
|
||||||
|
|
||||||
$return = new stdClass();
|
$return = new stdClass();
|
||||||
$return->success = true;
|
$return->success = true;
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
|
|||||||
Reference in New Issue
Block a user