Simple question
is there a way to know session expiry timestamp/date?
Or do I need to count manually by adding timeout (100 days if default) when session is created ?
r
rp_st
06/15/2022, 7:23 PM
There should be a function in the session object called
getSessionInformation()
. That should contain the expiry
d
david_sun
06/15/2022, 7:34 PM
Session object as in this?
Copy code
import Session from "supertokens-node/recipe/session";
r
rp_st
06/15/2022, 8:13 PM
If you use the Session recipe's static funciton, then you have to pass it a session handle and you can get info about that session.
If you verify a session in an API, then the
req.session
object contains that function to return info about the current session.
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).