https://supertokens.com/ logo
#support-questions
Title
# support-questions
k

kakashi_44

03/19/2021, 2:44 PM
hey @User, if you are already using supertokens middleware for the route, req.session will be a valid user's session object. If you just intend validate a sessionHandle, you can call function like getSessionData (link: https://supertokens.io/docs/nodejs/session/getsessiondata). The function will return sessionData if the sessionHandle is valid else, it will throw an unauthorised error. So call this function inside a try-catch block to avoid any unhandled error.