
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
- Appwrite as OAuth Provider
Is it possible to use Appwrite as an OAuth provider?
- How to use opt- in loading to get relate...
I am trying to do GET /v1/tablesdb/{databaseId}/tables/{tableId}/rows I read the documentation on how queries work with rest apis but canβt figure out how to...
- insecure connection on Appwrite sites de...
This only happens in microsoft edge for some reason. I inspected all network requests and they are all requesting https properly. All other browsers work fine. ...
