Hi, is there is a way to get the last date of connexion for a user ? The goal is to deactivate an account if a user has a big period of inactivity
r
rp_st
10/05/2022, 8:25 AM
hey @gwenael1249 we don't store the last active time of a user.
But you could store that yourself by overriding the createNewSession function and the refresh session function from the session recipe to store the timestamp in your own db and use that
g
gwenael1249
10/05/2022, 8:27 AM
thanks. To well understand the method Session.getAllSessionHandlesForUser returns only not revoked session
r
rp_st
10/05/2022, 8:28 AM
correct. But that has nothing to do with what i said
g
gwenael1249
10/05/2022, 8:29 AM
it's just to confirm. Thanks the answer I know how to manage this use case now
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).