🚀 مُصادَق: تحديث برمجي جديد 2026-05-03 13:19

This commit is contained in:
Hamza-Ayed
2026-05-03 13:19:45 +03:00
parent cf68007ef1
commit 2de6a0adfd
32 changed files with 1133 additions and 102 deletions

View File

@@ -32,8 +32,9 @@ final class JwtService
public function issueRefreshToken(string $userId): string
{
// Refresh token is a random string stored in DB (hashed)
return bin2hex(random_bytes(64));
// Refresh token is a random string prefixed with userId for lookup
$random = bin2hex(random_bytes(32));
return $userId . '.' . $random;
}
public function verifyToken(string $token): array