How can I resolve an invalid token in js

I am trying to resolve the error. When I verify my touch it marks it as invalid and my req.user as defined

index.js(this is my file)

const express = require('express');
const mongoose = require('mongoose');
const bcrypt = require('bcrypt');
const jwt = require('jsonwebtoken');
const { expressjwt: expressJwt } = require('express-jwt');
const User = require('./user');

const jwtSecret = 'mi-string-secreto';

mongoose.connect('mongodb+srv://prprueba37:[email protected]/auth?retryWrites=true&w=majority&appName=Cluster0');

const app = express();
app.use(express.json());

// Middleware para validar el JWT
const validateJwt = expressJwt({
  secret: jwtSecret,
  algorithms: ['HS256']
});

// Función para firmar el token
const signToken = _id => jwt.sign({ _id }, jwtSecret, { algorithm: 'HS256' });

app.post('/register', async (req, res) => {
  const { email, password } = req.body;

  try {
    const isUser = await User.findOne({ email });
    if (isUser) {
      return res.status(403).send('Usuario existente');
    }
    const salt = await bcrypt.genSalt();
    const hashed = await bcrypt.hash(password, salt);
    const user = await User.create({ email, password: hashed, salt });
    const token = signToken(user._id);
    res.status(201).send({ token });
  } catch (err) {
    res.status(500).send(err.message);
  }
});

app.post('/login', async (req, res) => {
  const { email, password } = req.body;

  try {
    const user = await User.findOne({ email });
    if (!user) {
      return res.status(403).send('Usuario y/o contraseña inválida');
    }
    const isMatch = await bcrypt.compare(password, user.password);
    if (isMatch) {
      const token = signToken(user._id);
      res.status(200).send({ token });
    } else {
      res.status(403).send('Usuario y/o contraseña incorrecta');
    }
  } catch (err) {
    res.status(500).send(err.message);
  }
});

// Ruta protegida que requiere autenticación
app.get('/lele', validateJwt, (req, res) => {
  res.send('ok');
});

app.listen(3000, () => {
  console.log('Listening on port 3000');
});

user.js(this is my schematics file)

const mongoose = require('mongoose')

const User = mongoose.model('User', {
    email: {type: String, required: true},
    password: {type: String, required: true},
    salt: {type: String, required: true},
    
})

module.exports = User

I have tried several things but my token is still invalid,
I have the libraries installed but I get some warnings
npm WARN deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm WARN deprecated [email protected]: This package is no longer supported.
npm WARN deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN deprecated [email protected]: This package is no longer supported.
npm WARN deprecated [email protected]: This package is no longer supported.