Rank 1: Thread
Hey every one, I have some problem, I wanna respond UserId when the user login using email and password from Rest API and Create Email Session() only work in client server, how can I get UserId from Server side, Thanks
Votes
0
Replies
16
Participants
Unknown
Messages
17
Rank 1: Thread
Hey every one, I have some problem, I wanna respond UserId when the user login using email and password from Rest API and Create Email Session() only work in client server, how can I get UserId from Server side, Thanks
Once the user logs in, use account.get()
It returns an Account object, which includes the unique ID.
Rank 1: Thread
how to login in server side, I am confussed
Rank 1: Thread
in my Laravel I add Appwrite sdk via composer, but I can't find Create Email Session() method, its because it only valid for server side or ? can please help me
can i ask why you want to respond with the userId from the server-side?
when a user logs in, it returns a Session Object on the client which includes userId
Rank 1: Thread
For client side there are 4 SDK uses, unfortunately my client uses .NET frame work, so I decide to use REST API, so I create email and password field in this net application and request Rest API to this end point "/v1/account/sessions/email", BUT error "guest user, Authorization error", how can I create user session in this case ? I try to create custom API endpoint in server side using api_key, but in server side there is no createEmailSession() function, that why I ask this question.
Admin
Will you have any JavaScript?
Rank 1: Thread
no, I only use https request
Rank 1: Thread
server side php, client side .NET
Admin
client side .net...interesting...
So since there's no SDK (and even if there were, the SDK currently in progress is for server-side use), you'll need to make the API calls and manage the session manually. This should be helpful: https://appwrite.io/docs/rest#client-auth. Then, after you have a session, you can call https://appwrite.io/docs/client/account?sdk=rest-default#accountGet
Admin
The example has X-Appwrite-JWT, but you might want to use the cookie if you can
Rank 1: Thread
Thanks it help lot
Rank 1: Thread
can you tell me the progress .net sdk for server side, when it will release, thanks
Admin
I'm not sure about the timeline for a release, but you can follow along with https://github.com/appwrite/sdk-generator/pull/320 to stay updated