Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

195
Views
NodeJS req.headers no definido después de enviar token JWT en encabezados

punto final de inicio de sesión:

 res.header("authorization", accessToken).send(accessToken) const user = await prisma.user.findFirst({ where: { email: req.body.data.email, }, }); const accessToken = jwt.sign( user, "my secret token there" ); if (!user) return res.sendStatus(400).send("Email doesnt exist"); res.header("authorization", accessToken).send(accessToken)
 router.get("/getAccountInfo", authenticateToken, getAccountInfo);

token de autenticación de middleware:

 export const authenticateToken = ( req: Request, res: Response, next: NextFunction ) => { const authHeader = req.headers["authorization"]; ...more code }

authHeader no está definido

en los encabezados de los puntos finales de inicio de sesión se ve la autorización, pero el middleware no

about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!