I'm searching and trying to login using python SDK for appwrite using Account and Users.. but can only see how to "create" a new user using Users().create(user-object-data), but there isnt anything for creating Email session connected to login system.. its only available for node js and other things not available in python SDK.. please help
There is no "create-session" method available in the python-sdk...
yes, we have Client and Server SDKs. Creating a session is only available in a Client SDK. See https://appwrite.io/docs/sdks
Can you provide some more context on what you're building?
Yes sir, i checked the docs, but there's everything related to session present in sdks as well, except for creating session in python sdk, i think that should also have been there, since you're providing listing of sessions, deleting of sessions getting sessions based on session ID, etc.
so my customer wants a login system built with dashboard and users should be able to paste video links, which will be converted to audio and added to theri respective google drive links
my approach: i'm using flask as backend, and next-js for frontend video-audio conversion : will come from frontend to flask and then to background process audio-upload: will trigger from frontend to flask and then to background process thought: since the video to audio conversion and audio upload to google drive is long process (this has to be background process, hence i'll be using celery to achieve this part)
but this celery can only be triggered from frontend > flask > celery
eventually i want to deploy this to AWS, as my customer has some credits available there, (so i'm using cloud functionality and not the docker for local system) please let me know your thoughts on this!
It doesn't really make sense to create a session fron the server SDK, as users don't interact directly from the server. It does make sense to manipulate created sessions from the server side though.
But how can I manipulate created sessions from server side, if I'm not able to create it at first place from server, server sdks can update, verify, get ,etc., only thing which is not available to create session...
What's your solution to this? Should I use both server sdk and client sdk together?
Client sdk may create-email-session
Server sdk to coordinate between database and user session
Why do you need to create sessions from the server side? What do you want to do with those sessions?
If I use next js with appwrite ( client sdk) for registering login sessions, etc. , I won't be able to use python functions which are required to check if user is logged in and has set some heavy task to run,
So to this I have to add flask + celery to handle the huge background task,
Now if I have to check user session, I may need to able to create it from server sdk is what I'm asking
Sorry, still not getting it. If you created a session on the client side and another on the server side, how would that help you to know whether or not the user is signed in on the client side?
Session will be created only on 1 side, and handled by server, client will only display whatever is necessary based on session
My question was, suppose I'm creating a session using client sdk, now I have several tasks that takes time to run and only be able to run when user triggers the task ( which is in python, so to handle this I have used flask, and for background process using celery )
I want that only user-in-session should be able to run a specific task
And to check if user-in-session on server(flask) I had to create the session here instead on client (next js)
To solve this, I could create session on client, and just trigger celery functions using flask without checking for session, since user will already be in session to run the task?
As soon as task finishes it should also make several entries in database related to user, and task can be finished on server so I definitely need server sdk for this
Just to confirm - where are you running these - on your own server or in an Appwrite Function.
If I'm understanding you correctly, the recommended method is to create a JWT on the client side, and pass it over to the server side. You can use that to verify the user.
If I create jwt on client and send it to server, I need to store it on server or maybe set cookies
Using: Appwrite cloud.io (trying to use) Backend flask server Frontend NextJs
This is my first project with appwrite
No, you just need to use it once to get the user data. JWTs expire after 15 minutes, anyway.
If these "long-running tasks" could be moved to an Appwrite Function, you could dispense with the auth step altogether, because you could trigger the Function from the frontend via the SDK, which handles the Auth for you
Yes, I think that will be more easy solution to all this, I have to read about that... I usually create this auth from scratch everytime and used firebase couple of times, but appwrite seems more flexible to use, hopefully I could connect these functions with client using appwrite and deploy
Thank you so much for your help I'll be back if I have doubts about other things.. <:appwrite:1156975611466764298>
Recommended threads
- apple exchange code to token
hello guys, im new here 🙂 I have created a project and enabled apple oauth, filled all data (client id, key id, p8 file itself etc). I generate oauth code form...
- I recently applied for the free plan und...
I recently applied for the free plan under the GitHub Student Developer Pack. However, my billing status still shows $15, and it mentions that this amount will ...
- Bug Report: Appwrite Console UI Issue on...
Steps to Reproduce: - Navigate to any collection page in the Appwrite console UI. - Open the menu and click on "Create Collection." - Observe that the dialog to...