rp
02/01/2022, 5:48 PMextremelf
02/01/2022, 5:49 PMrp
02/01/2022, 5:49 PMMr Chill
02/01/2022, 6:33 PMworkoutintheabstract
02/01/2022, 7:46 PMrp
02/01/2022, 8:28 PMrp
02/01/2022, 8:29 PMsAccessToken
and sIdRefreshToken
cookies in the request and attempts to use those to verify the session. If successful, it creates a session
object inside the req
object which can be used in your API to get user info and / or manipulate the session.gadi
02/01/2022, 8:30 PMrp
02/01/2022, 8:34 PMgadi
02/01/2022, 8:36 PMrp
02/01/2022, 8:37 PMrp
02/01/2022, 8:37 PMgadi
02/01/2022, 8:41 PMrp
02/01/2022, 8:42 PMgadi
02/01/2022, 8:43 PMgadi
02/01/2022, 8:43 PMgadi
02/01/2022, 8:44 PMrp
02/01/2022, 8:45 PMgadi
02/01/2022, 8:46 PMNote that unlike the REST case, you don't use the native response object to generate a response.
rp
02/01/2022, 8:46 PMrp
02/01/2022, 8:48 PMrp
02/01/2022, 8:48 PMrp
02/01/2022, 8:48 PMgadi
02/01/2022, 8:50 PMrp
02/01/2022, 8:50 PMgadi
02/01/2022, 8:50 PMrp
02/01/2022, 8:51 PMworkoutintheabstract
02/01/2022, 8:54 PMrp
02/01/2022, 8:55 PMverifySession({sessionRequired: false})
to make it call the next middleware even if a session doesn't exist. In this case, req.session
will be undefined
.gadi
02/01/2022, 9:23 PM