How can I get total session time for a user?
Unanswered
Transvaal lion posted this in #help-forum
Transvaal lionOP
I am new to NextJs. I am using Next Auth for authentication, using credentials and an API written with Laravel (Sanctum). For gathering statistics about the user, I want to store the total logged-in time of the user in the database. What is the best approach to this? Is there any easy way of doing so?
2 Replies
@Transvaal lion I am new to NextJs. I am using Next Auth for authentication, using credentials and an API written with Laravel (Sanctum). For gathering statistics about the user, I want to store the total logged-in time of the user in the database. What is the best approach to this? Is there any easy way of doing so?
if you are using a session based auth (not jwt), then you can extend the (logged in) time in your database, whenever the
session callback is called@Transvaal lion solved?