Hello,
I'm calling webhooks the following way:
app.post('/webhook', function(request, response) {
//Sanity checks....
Parse.User.logIn("foo", "bar").then(function(result){
return Parse.Cloud.run("mycloudFn");
}).then(function(result){
response.status(200).send('ok');
},function(error){
response.status(401).send(error.message);
});
});
The problem is that Login creates a Session object that I can't quite get rid of..... I tried to call request.user.logOut() in the cloud function, but this breaks the code, since the user doesn't exist anymore. Calling user.logOut() in the webhook's success/error closure has detrimental side effects since the response back to the client can't insert the session cookie anymore.
What's the suggestion on b4a side? How can I get the session object to be deleted while calling webhooks?
thanks