Skip to content
Back

[SOLVED] Call appwrite function using jwt token

  • 0
  • Functions
squallsama
5 Mar, 2023, 07:19

I can see in permissions that I can select - role, user id, team, but there is no option for particular JWT token. Is it possible to restrict executing appwrite function by particular jwt token ? I can think about checking req params and return 500 if req param doesn't have proper JWT token, but maybe there is a better solution ?

TL;DR
The user is asking if it is possible to restrict executing Appwrite function by a particular JWT token. They mention that they can check request parameters and return an error if the proper JWT token is not present, but they are seeking a better solution. No solution is provided in the thread.
Meldiron
5 Mar, 2023, 07:55

Hey there 👋 JWT token is short-lived "secret" that can be used to impersonate a specific client on the server. When you want to allow specific JWT to execute a function, you simply allow it to specific user. Every JWT token that this user generated will then be allowed to execute it - but no other user.

squallsama
5 Mar, 2023, 07:55

Perfect solution. Thank you !

Meldiron
5 Mar, 2023, 08:06

[SOLVED] Call appwrite function using jwt token

Sandeep K. Dasari
10 Jun, 2023, 09:56

Could you please send me any example.

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