UnAuthorized Access Response from backend [error]

I am Working on Mern Stack App and its my first time making a full stack app .Now I am very close to finish Actually what i am doing is to place order by user Al the things are good Payment status is success from backend (stripe) but error I am getting is getting unauthorized access although my user is logged in and cookies are sending to other request for example I have implemented a Loaduser function that makes req to backend route against which I receive all the user data .Now the question is Why for one req it is working (loaduser) and for other req (order) . Here is Github link .File from which I am sending order to user :https://github.com/abdulmoizsheraz/Mern-Stack-Learning/blob/main/frontend/src/Pages/Payment.jsx .
OrderController :https://github.com/abdulmoizsheraz/Mern-Stack-Learning/blob/main/backend/controllers/OrderController.js , I value your Time but Please Help ! :slightly_smiling_face:

Hello, this seems like a security issue, anyway that is probably where I would start and also a compatibility issue could be going on here. I found this on MongoDB and I`ve decided to make this my first full stack project as well. Good luck

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.