I\'m using node.js with Express and connect-auth to authenticate users.
This is the verification when requesting /index:
if(req.isAuthenticated()) { re
Another way is to app.use a middleware function. (Example in CoffeeScript.)
# middleware authKick = (req, res, next) -> if not do req.isAuthenticated then return res.redirect '/login' return do next # apply app.use authKick
This will work on each request without having to touch the routes.