how rememberMe works?
hello, how does the rememberMe work (on the client)? Do I need to call anything to "login" with saved session, or just instantiating the client is enough for it to use a saved session (eg getSession and useSession return the correct session)? Or do I need to manually pass headers/token to some other function?
My use-case is, there could be more than one server. So the client instance/baseURL can change. But if a user was logged in on a server I want him to automatically login. (I already have all the "info" about server and if it is logged in on that server in localstorage, but I don't know the betterauth api to do this)
My idea is: if a user changes the server, all sessions are revoked.
1 Reply
It's all automatic, no additional configuration should be required.
All it changes is the expiration date on your session cookie.
If rememberMe is
false
, it would set the session cookie to expire after that day.