🚀 مُصادَق: تحديث برمجي جديد 2026-05-03 13:19
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user