I am trying to find the active user session but the session documents returned from account.listSessions() display current: false for every session.
A workaround I am using is to decode the jwt on the client-side which contains logged in user's sessionId and comparing it to the list of sessionIds. Wondering if there's a better way to do this?
Thank you!
account.getSession('current')?
I have not tried using this, will give it a shot and let you know how it works. Thank you
why do you need to get the session?
Recommended threads
- Next16 server side and client side
I want to use AppWrite in a Next.16 project. Following the documentation, I implemented server-side authentication using Node-AppWrite. Is it possible to make a...
- Custom domain verification failing
Im having trouble adding custom domain to my project with the domain verification failing within my project but in organization view its verified
- Facing this Exception User (role: guests...
After creating an OAuth2 session using createOAuth2Session in Appwrite, the session is created successfully in the cloud console, but when I try to fetch user d...