Hello,
I’m logging my user with ``/parse/login``` endpoint given from parse REST API, which returning my whole logged user object with sessionToken, which is saved to db.
Now when in my custom endpoint /parse/function/customEndpoint i try to retrive Parse.User.current() it’s returning null even when i set requireUser:true. This is example:
Parse.Cloud.define(
'createTeam',
async (request) => {
const user = request.user;
const userCurrent = Parse.User.current();
console.log(user.id);
console.log(user.getSessionToken());
console.log(userCurrent);
},
validator.teamValidation,
{
requireUser: true,
}
);
result of console.log:
.
I have no idea why this current() method does not returning my current session user
this is my session: