I was wondering how to implement "user last logged...
# support-questions
c
I was wondering how to implement "user last logged in date" with Supertokens. It seems there is not a feature for this, or I might be blind πŸ˜„ Do I have to update user metadata with new Date() each time the user hits an API endpoint?
r
Do you want to implement user last logged in? Or user last active?
c
either is fine
r
Well, for last logged in, you can simply override the createNewSession function from the session recipe and update the user’s metadata with the current time
c
that sounds good πŸ˜„
r
πŸ‘
c
I think I prefer "last logged in", as to not spam metadata updates
r
You can even override the session refresh function and update the metadata in there. But this would be more like last active (or rather an approximation of that)
c
okay cool, thanks for the tip!