Refactor authentication: streamline cookie handling and enhance username retrieval in responses
This commit is contained in:
1 parent
a1bbae383a
commit
6b5a299079
3 files changed
+45
-18
No files matched your search
@@ -40,7 +40,6 @@ if ($result && password_verify($password, $result[0]["password"])) {
|
||||
|
||||
// Set cookies
|
||||
setcookie("auth_token", $token, time() + 86400, "/");
|
||||
setcookie("username", $username, time() + 86400, "/");
|
||||
|
||||
$api->answer(200);
|
||||
}else{
|
||||
|
||||
Reference in new issue
Block a user