Skip to content Skip to sidebar Skip to footer

Isauthenticated() Function Not Working Node.js Passport

I am creating online course application and I want only authenticated users to see the course details and course lecture. I am using local strategy of passport authentication for u

Solution 1:

Call isAuthenticated function from http verb means from get, post, patch, delete

like:

app.route('/api/courses/:courseId')
 .get(isAuthenticated, courses.read)

also isAuthenticated can be write in another file and use it from your route

Can see this example

Post a Comment for "Isauthenticated() Function Not Working Node.js Passport"