Is there a feature to fetch all logged in device s...
# support-questions-legacy
p
Is there a feature to fetch all logged in device sessions ?
r
hey @productdevbook there is no such API. But there is an API to get all sessions for a user
So when u create a new session, you could store info about the device in it
and then get a list of all sessions for the user to display their list of logged in devices
p
you could store info about the device in it
Is there a library you can recommend for this?
I think we are recording data according to the incoming
req
.
supertokens-web-js/recipe/session
is there ?
r
> I think we are recording data according to the incoming req . Yea. Thats the right way of doing it.
you essentially want to override the createNewSession recipe function in session recipe and add info to the sessionData about which device this session is being created for (reading from user-agent from the request)
and then later on fetch that info by getting all sessionHandle for the current user, and for each sessionhandle, getting its session data.