What i'm doing is the following. Users can add other users as friends. For this, I have a friends collection (user1, user2, pending). The user calls this function and passes his own userid and a unique friends code as json to the function. What im wondering is, what stops another user from adding users for other users if he stole their userid?
The function is executable by logged in users only, but how could I check that the person who called the function, is the person he/she pretends to be with the provided userId in the json payload?
Is there a way to grab the user id backend side?
Yep! Refer to https://appwrite.io/docs/functions#functionVariables
Recommended threads
- Production down - createExecution return...
Hey, Since 1.9.6 rollout in fra (~17:00 UTC, 14 Aug), POST /v1/functions/{functionId}/executions returns a 400 whenever the body includes an empty headers ob...
- CreateRow is doing ListRows on self-host...
### setup ``` appwrite 1.9.5 self-hosted bun 1.3 node-appwrite 27.1.0 ``` ### issue Im running a function on a self hosted 1.9.5 with "node-appwrite": "^27.1.0...
- Local function execution results in HTTP...
Hi all, I'm trying to develop a new function on my Ubuntu 24.04 machine running the latest version of docker. I've read through the documentation to install and...