Closed nrlysek closed 7 years ago
The middleware for this has been implemented in feature/auth (96e42bf331757720af13a7984720e2cddef9bbb0).
You can protect your routes by importing utilities/auth.js and adding the .verifyAuthenticated function to your route like so:
var auth = require('../utilities/auth');
...
router.get('/users/me', auth.verifyAuthenticated(), (req, res) => {
// implementation here.
});
We need authentication for many of our API endpoints. We will probably use OAuth(2) and Google's API's.