
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
- Struggling with Sessions
Understanding check: createAnonymousSession() registers the session with the backend setSession() creates a cookie on the user’s computer(?) getSession(‘curr...
- How to set wildcard at custom doamin
For OAuth2 redirect, I have set the appwrite api endpoint as appwrite.example.com, and added the CANME in cloudfare where I bought the domain name. And I hosted...
- Appwrite Datetime Fields Display as "N/A...
I'm facing an UI issue on appwrite's collection documents list. A related question is opened by me on stackoverflow. https://stackoverflow.com/questions/796559...
