I went with the first option - Querying the session table and comparing it.
But Iām facing problem in the backend. When I do a query like this,
async function verifysessiontoken(sessionToken) {
await Moralis.start({ serverUrl, appId, masterKey });
const query = new Moralis.Query("_Session")
const results = await query.find({useMasterKey:true});
console.log('SESSION RESULT: ', results)
return results
}
The query successfully returns the data like this in the backend - (Canāt find session token anywhere)
Whereas in the frontend it shows the data that I expect -
Why is that the same response shows differently in backend console and frontend console. I actually need just like the data shown in the frontend ( the session tokens and other stuffā¦) in my backend to perform validation.