How can I secure my express "GET" route in my App so emails and user data can't be exposed to an unauthorized client. I was wondering, should I hash all the fields as I did with password?
My GET "/users" route sends JSON like this..
{
"name": "keven",
"email": "[email protected]",
"user": "keven",
"password": "EEOnGFritH1631671dc8da7431399f824b3925a49e",
"country": "America",
"date": "April 20th 2013, 10:34:22 pm",
"_id": "5173502e5g52676c1b000001"
}
In my backbone and node/express app I have a url in my backbone collection, like this..
Users = Backbone.Collection.extend({
model: User,
url: '/users',
});
And the express route is like this:
app.get('/users', function(req, res){
User.find({}, function (err, accounts) {
res.send(accounts);
});
});
Thanks.