Back

Verify JWT server side

  • 0
  • Self Hosted
  • Auth
  • Web
BeT
28 Aug, 2024, 01:11

How can I verify jwt with server sdk. In the backend I want to do something that usually is not allowed to the user

TL;DR
To verify JWT server-side with a server SDK: - Use a server SDK - Call `client.setJWT()` - Call `account.get()` to perform the necessary actions in the backend that are not typically allowed to the user.
Steven
28 Aug, 2024, 01:20
  1. use a server SDK
  2. call client.setJWT()
  3. call account.get()
BeT
28 Aug, 2024, 01:23

and then create another instance of Client with api key? is this the only way?

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more