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
- Do I need to upgrade my Appwrite plan?
So i am making a file hosting & sharing platform (voltzy.lol) and i am expecting approx 5-8 million visit per month and over 30 million uploads per month do i n...
- total parameter not working correctly in...
Hello Appwrite team, I'm experiencing issues with the total parameter in the listRows() method (TablesDB) across multiple SDKs. **Issue 1**: Node.js SDK (node...
- Accessing secure files from storage via ...
Hi everyone, can someone tell me what is the preferred way of accesssing user only files from storage in react native? I saved the file with user only read per...