I have a cloud code hosted admin console application. It requires the admin to login using the provided credentials.
exports.signin = function onSignin(req, res) {
//console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>> Logging In ...." + req.body.username + " " + req.body.password);
console.log(req.body.username);
Parse.User
.logIn(req.body.username, req.body.password)
.then(function(obj) {
console.log("LOGIN OK " + Parse.User.current().id);
var query = new Parse.Query(Parse.Role);
query.equalTo("name", "Globetrekker Admin");
query.equalTo("users", Parse.User.current());
return query.first();
}, function(error) {
console.log("Error Logging In: " + error.message);
//res.redirect("/error");
res.render('login', {
errorMessage: error.message
});
})
The function is hit correctly and the username is shown in the logs. But after that there is no response and after some time it gives a 404 response in the browser. The Parse.User.logIn function never returns and as I have mentioned before as a major bug in your offering, there is no error log or anything showing whats wrong. Its a sincere request to please rectify this.
Anyways I have no idea why the logIn function is not working in the cloud code. Does open parse server not provide this feature.