I have an angularJS $http.post
that sends username/password to a PHP file that then queries my database to verify a successful log in. I then return a JSON object back to angularJS in one of the formats below:
{'success' : 'true', 'userFirstName' : [firstNameFromDatabaseQuery]}
or
{'success' : 'false'}
Once back in angularJS, I check the value of success to determine if the user's credentials were valid, and log in the user if so.
To my question - can this JSON response from PHP be modified by a user to mark their log in as successful, by changing success
to 'true'?
I feel it is worth mentioning that I chose this way over using PHP session variables because it was not working well in my angular application, and it also seems to be a lot cleaner code. Additionally, this is a very simple application. No significant personal information will be involved, such as SSNs or bank/credit card info.