fix all issues

This commit is contained in:
root
2026-03-24 01:02:36 -04:00
parent 0f8a1fa0b1
commit 58445b2a48
19 changed files with 674 additions and 167 deletions
+2 -1
View File
@@ -469,6 +469,7 @@ class AuthController extends Controller
// Generate a secure token for the password reset
helper('text');
$token = bin2hex(random_bytes(48));
$tokenHash = hash('sha256', $token);
// Calculate the expiration time for the token (1 hour from now)
$expires_at = Time::now()->addHours(1);
@@ -477,7 +478,7 @@ class AuthController extends Controller
$passwordResetModel = new PasswordResetModel();
$passwordResetModel->insert([
'email' => $email,
'token' => $token,
'token' => $tokenHash,
'created_at' => Time::now(),
'expires_at' => $expires_at,
]);