From b27b98fe3fe81ba0b390d1b9d126e72eea8a33d5 Mon Sep 17 00:00:00 2001 From: biglyderv Date: Thu, 2 Jan 2025 21:50:07 -0500 Subject: [PATCH] auth api --- docs/auth.php | 5 +++++ docs/login.php | 11 +++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 docs/auth.php diff --git a/docs/auth.php b/docs/auth.php new file mode 100644 index 0000000..9b49252 --- /dev/null +++ b/docs/auth.php @@ -0,0 +1,5 @@ + diff --git a/docs/login.php b/docs/login.php index fa72ca5..c7e7620 100755 --- a/docs/login.php +++ b/docs/login.php @@ -30,7 +30,14 @@ $stmt->execute([$user,$token]); setcookie("token", $token, time()+3600*24); - + + if (isset($_GET['next'])) { + $gett = htmlspecialchars($_GET['next'] . '?token=' . $token); + echo ""; + page_footer(); + die(); + } + header("Location: /"); die(); } @@ -45,4 +52,4 @@ )); page_footer(); -?> \ No newline at end of file +?>