hagopj13 / node-express-boilerplate

A boilerplate for building production-ready RESTful APIs using Node.js, Express, and Mongoose
MIT License
6.99k stars 2.05k forks source link

Authorization routes #184

Open vanshreddy opened 2 years ago

vanshreddy commented 2 years ago

I have not changed any files but I created a new route : router.route('/buser').get(userController.bUser) where bUser is a function.

When I run this route, I get a authorization error. How do I create a unauthorized route.

diode02 commented 2 years ago

can you share your whole code

joelvinaykumar commented 2 years ago

It might be related to Passport JWT middleware. You can modify this behaviour in src/config/passport.js

femiogundare commented 2 years ago

I have not changed any files but I created a new route : router.route('/buser').get(userController.bUser) where bUser is a function.

When I run this route, I get a authorization error. How do I create a unauthorized route.

Have you solved it?