
So I create jwt on the frontend for the user:
const promise = account.createJWT();
How do I retrieve it on the backend?
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('[PROJECT_ID]') // Your project ID
.setJWT('eyJJ9.eyJ...886ca'); // Your secret JSON Web Token

from client send it to server

is JWT attached to every req?

No

If a user is execution the function then any time is doing so a fresh JWT will be sent to you inside the APPWRITE_FUNCTION_JWT
variable.
Like so
.setJWT(req.variables.APPWRITE_FUNCTION_JWT ?? '')
Check here for more details: https://appwrite.io/docs/functions#functionVariables
Recommended threads
- Use cloudflare origin certificate instea...
Hello! Is it possible to use cloudflare origin certificates instead of let's encrypt? We manage all ssl certs in our cloudflare account and our VMs has a firewa...
- Error getting session: AppwriteException...
I get this error `Error getting session: AppwriteException: User (role: guests) missing scope (account)` when running in prod. As soon as I try running my app o...
- Unable to View / Edit Bucket Files
Hi! I am unable to view / edit Bucket Files. While Previews work just fine, clicking the actual file to view or edit it produces the errors seen in the attache...
