List sessions server side
Hello,
I'm making a sveltekit app where after the login input, if credentials are right, the server look for other sessions of the user, if there is another session open (for example in another device's browser) there is a modal that asks for session removal (it's a web app and I need to limit multiple sessions) then the log in proceeds.
Is there a way to use
authClient.listSessions()
on the server? Because I could login the user before and then prompt the session and log out if the other is not removed, but it looks more prone to exploits and I'd prefer server-side operations.0 Replies