active-users icon indicating copy to clipboard operation
active-users copied to clipboard

API Active Users?

Open jjjrmy opened this issue 4 years ago • 2 comments

When using a REST API for a SPA then users don't show up active. Is there any way to see active logged in users also including SPA users?

jjjrmy avatar Dec 07 '21 20:12 jjjrmy

Are you using Sanctum with the stateful SPA? Or completely stateless API with JWT or something along those lines?

I would think with a stateful API you would have the same session scaffolding so you could see the active sessions, but I'm not sure how you would pull it off with JWT. I would think it would depend on the library you're using, maybe you could grab any active tokens, or maybe there's a last login time?

joshrainwater avatar Dec 07 '21 20:12 joshrainwater

Users who are login and requested through api.php not web.php in the routes, are not counted because I see table sessions are not getting updated if you log in through API. Is there a way to make those users get counted?

kardoaziz avatar Jun 22 '22 10:06 kardoaziz