This commit is contained in:
@@ -35,6 +35,13 @@ $data = json_decode($response, true);
|
||||
if (isset($data['status'])) {
|
||||
if ($data['status'] == "success") {
|
||||
// Successful authentication: login the user
|
||||
session_set_cookie_params([
|
||||
'lifetime' => 0,
|
||||
'path' => '/',
|
||||
'secure' => true,
|
||||
'httponly' => true,
|
||||
'samesite' => 'Lax',
|
||||
]);
|
||||
session_start();
|
||||
$_SESSION["username"] = $data["username"];
|
||||
$_SESSION["id"] = $data["id"];
|
||||
|
||||
Reference in New Issue
Block a user