
The guide for server side auth states users should use the cookie secret to validate a user :
account= Account(sessionclient).setsession(cookie)
account.get()
How would i retrieve a session, i don't want to set a new session on each login?? getsession seems to take sessionid as a parameter....but the guide on appwrite says the cookie should be set as the secret. so how does that work? seet another cookie or store in local storage the session id?

Yes, you have to persist on login. Something has to persist somewhere.
Set another cookie? What do you mean?

what do you mean persist on login? - by set another cookie i mean set another cookie with the session id so the getsession function works

A session must be persisted. The session can be persisted in a single cookie. When you say "another" it sounds like there are multiple, but I'm not sure what other cookies you're referring to

the guide says i should set the cookie as the 'secret' when a session is created. The cookie is validated in the code i've mentioned- i.e setsession(cookie secret). How can i validate a session?? set session seams to create a session everytime it is called .....I want to validate an existing session. what im asking is as simple as it gets. How can someone validate an authorised user....your guide only mentions a cookie with a secret value inside. This cannot be used to get_session() as that func requires a session id....so how does appwrite suggest i manage the sesssion id?another cookie? i already have a persisted cookie with the secret.

You validate the session by making an account.get()
API call.
There is no ID you need to keep track of

sir......account .get
needs to be set by a cookie according to your guide! Account(sessionclient).setsession(cookie) -----> account.get()
if i just call account.get() how will it know who's account? This is incorrect. What i'm asking is painfully simple.

it also seems to create a newsession each time setsession is called. This not how validating a user works.

I want to validate a user ie use get session. getsession func requires session id whch i have not been advised on how or where to store.

client.setSession()
sets the session on the client so that all subsequent requests with that client will make the authenticated request.

Not sure what you're talking about. SetSession doesn't make any API calls. It just sets a property in the Client object
Recommended threads
- Login redirect going to http not https
Hi yall, I'm having an issue where the redirect URL is going to http, instead of https. I think this is a bug. ``` https://accounts.google.com/o/oauth2/v2/auth...
- Database not found
i am getting an error named - database not found . I have logged on yesterday and it was working fine. But today it fails . More clearly i can say, each new day...
- 500 error trying to view database consol...
My project was blocked yesterday for queries missing a custom index. After it was restored, I was able to see the console last evening. But, when I try to acce...
