Here's is my code. I'm trying to use passport authenticate to store the info of patients specific to the token created for each person.
router.get("/current", passport.authenticate("jwt", { session: false }), (req: Request, res: Response) => {
res.json({
id: req.patient.id,
fullName: req.patient.fullName,
age: req.patient.age,
email: req.patient.email,
phoneNumber: req.patient.phoneNumber,
address: req.patient.address,
medicalHistory: req.patient.medicalHistory,
});
});