<?php
header("Content-Type: application/json");
require "core/EntityVariables.php";

$data  = json_decode(file_get_contents("php://input"), true);
$email = $data["entity_email"] ?? null;

$_SESSION['entity_email'] = $email;

echo json_encode([
    "success"  => true,
    "redirect" => "loginAuth?entityId=$random_entity_id",
]);

exit;
?>