I'm currently developing a Web Application with AngularJS and I have the following question with the login system: is secure to store the information like username you used to login into the cookies?
I mean, when i login I want to store the username or the id, would be the same, into a cookie, so I can load more information from the database each time the user navigates between the different links. The thing is that I don't know if Angular has any protection about cookie edition or, in other words, should I trust this cookie's value will be the correct one?
For example, having this piece of code, is it secure?
var request = {
url: 'backend/getCharacters.php?user=' + $cookies.get('username'),
method: 'GET'
};
$http(request).then(function(response) {
if(response.status == 200)
// Get character list
else
alert('Something went wrong.');
});