authClient.listSessions returns empty array
Hey everyone, I'm trying to list the sessions of the user to display in their profile, but authClient.listSessions always returns an empty string. What am I missing?
backend (hono js):
frontend (react)
Everything else seems to work fine, the sessions are persisted in pg.
(same question on Reddit: https://www.reddit.com/r/better_auth/comments/1jguvvs/authclientlistsessions_returns_empty_array/)
Solution:Jump to solution
@bekacru I forgot to post it here, but it has been solved, user error 🙂
https://github.com/better-auth/better-auth/issues/1965...
GitHub
authClient.listSessions returns empty array · Issue #1965 · bette...
Is this suited for github? Yes, this is suited for github To Reproduce Project Stack: hono better-auth postgres When calling either authClient.listSessions or auth.api.listSessions it always return...
2 Replies
update to latest if you're not in
1.2.5
Solution
@bekacru I forgot to post it here, but it has been solved, user error 🙂
https://github.com/better-auth/better-auth/issues/1965
GitHub
authClient.listSessions returns empty array · Issue #1965 · bette...
Is this suited for github? Yes, this is suited for github To Reproduce Project Stack: hono better-auth postgres When calling either authClient.listSessions or auth.api.listSessions it always return...