
I am creating a function that will validate the jwt that comes in the headers(x-appwrite-user-jwt
), and then perform some db operation.
I am using node-18
to write the cloud functions, I am thinking of using jsonwebtoken
to validate the JWT, but I can't seem to find the SECRET
of the JWT that appwrite uses to sign.
How do I set SECRET
for the appwrite to use in JWT.

the best way to validate the JWT token is to do:
client.setJWT(token);
const account = new Account(client);
let isValid = false;
try {
const user = account.get();
isValid = true;
catch (e) {
context.log(e.toString());
}

Great, Thank you so much.

[SOLVED ]Validate JWT in cloud functions

[SOLVED] Validate JWT in cloud functions
Recommended threads
- Server Error when Pushing a Function
Get this ambiguous error when trying to push my function, it's TypeScript using NodeJS 18 ``` ? Which functions would you like to push? get-grades (get-grades)...
- Network error when attempting to fetch r...
Hi, I am trying to modify some database data in the console for testing but keep getting this error. I am on the appwrite cloud and have already tried clearing ...
- Having errors migrating to cloud
Project will not migrate compeltely
