I noticed I cant find anything for createEmailSession() from the server-side dart SDK,
Is it possible to create a session for the user from server-side? If so what is the difference in security between that and doing so client side?
is there ever a case where you'd want to create a Session from a server-side function? Other than in the case of using another platform to take care of part of the work?
when using createEmailSession() from client side is there any issues I need to be aware of, or security risks? Would it be the most advised way to go about creating sessions?
ig there isn't much use of generating a session-side session because sessions are for verifying a user and there's no concept of user in the backend. server-side sdk's work using api keys and api keys have access to everything.
That's not available server sided because the session is stored locally in the user's end (a session cookie is saved). Also it's logged server sided and the session is recorded too server sided, and in fact you can control all sessions a users has.
You should not worry about security since behind the scenes what you're doing is login the users in the server (sending the credentials to the sevrer, etc)
gotcha! so a server-side function to authenticate the users login credentials (to create a session) would be redundant while not being any more secure?
Will be useless, and will do exactly the same as calling createEmailSession() but overcomplicated and without any improvements regarding security
gotcha! thank you both so much for your answers!
As said, what createEmailSession() does behind the scenes is triggering and creating a session that is being previously authorized and saved server-sided
@D3str0y3d255Can I mark this as solved?
yes please! Thank you again for your assistance!
[SOLVED] Appwrite Server-side Function questions
[SOLVED] How to create a session servier-side?
[SOLVED] How to create a session server-side?
as others have mentioned, it's easiest to create sessions client side since we use cookies and the browser handles all that automatically.
Technically, you can create sessions server-side...but you'd have to manage the session yourself and how you do that varies with what technology you're using
Recommended threads
- Realtime with multiple connections
I need the Realtime on multiple Collections for diffrent applicational logic. So my question is: Is there a way to have only 1 Websocket connection or do I need...
- Can't login or deploy functions in Appwr...
Hello, since i updatet to the appwrite cli 6.1.0 i can't login or deploy functions with the cli. When i call the command: "appwrite get account --verbose" i ge...
- Create admin user?
I'm not really sure how this is supposed to work, I installed Appwrite through docker-compose and set it up. When I launched the app and went into it, I created...