diff --git a/src/server/cyberhex-code/test/login.php b/src/server/cyberhex-code/test/login.php index fc9249f..c312e9e 100644 --- a/src/server/cyberhex-code/test/login.php +++ b/src/server/cyberhex-code/test/login.php @@ -188,8 +188,6 @@ try { // process the get request. throws WebAuthnException if it fails $WebAuthn->processGet($clientDataJSON, $authenticatorData, $signature, $credentialPublicKey, $challenge, null, $userVerification === 'required'); - $return = new stdClass(); - $return->success = true; //we have authenticated the user! $_SESSION["username"]=$userName; $_SESSION["login"]=true; @@ -197,6 +195,9 @@ try { $_SESSION["email"]="janis.st44@gmail.com"; $_SESSION["telegram_id"]="1234"; + $return = new stdClass(); + $return->success = true; + header('Content-Type: application/json'); print(json_encode($return));