
I have a secondary server where I do some work can i check in that server that the request to that server is sent by a logged in Appwrite user

You could send the user's JWT token to your server

that expires in 15 min should I send a new JWT with each request

users sessions can last long

What is the recommended whay to work around it

What's your stack? Can you provide some more detail on your setup?

yeah I have an endpoint which makes videos and run some long running processes . I want to put it on my server so that I can use a GPU it is a Python Django backend I have everything else integrated in appwrite how can I check that the request to this long running endpoint is snt by appwrite user.

I user Python Django for ruuning the GPU servers on AWS.

Do you use your Django backend for anything else?

No

Is the original request coming from a client side SDK?

yes

In that case, you can just run a quick check from the client side and only send that request if the user is authenticated so the server wouldn't get this request from unauthenticated users. Then to retrieve the user, you can just use the users API on the server and get the user by ID:
users.get('[USER_ID]');

Basically, the auth check happens on the client. So you can take advantage of the long lasting session.

Steven's suggestion of a JWT would also should work. Just generate a JWT on each request and send it to verify auth status. The short lived token shouldn't be an issue.

I would just use the JWT

Generating a new JWT on each request is not a problem right
because checking if the user is authenticated from client and only sending the request I will have to keep my server endpoint unauthenticated which I can't do because using GPU so it can be expensive

How often will you be making these request?

at max 2-3 time/15 min

Just curious if its every couple of seconds or maybe only a few times a day per day

Per user?

yeah
Recommended threads
- fix attribute view
enum attribute elements style, when adding many options, the elements box should be responsive
- API Endpoint to Verify Password.
I have 2 use cases where i need to verify a users password outside of login, e.g. Updating user account data (such as name, or prefs, or data in a users databa...
- search collection by document ID
How to filter or search collection for a document using document ID, I can't find this item on the filter menu
