createNewSession(res, userId, jwtPayload, sessionData)
Parameters
res
- type:
Express.Response
- type:
userId
- type:
string
- type:
jwtPayload
- type:
object
- type:
sessonData
- type:
object
- type:
Returns
Promise<Session>
on successful creation of a session.
Throws
Additional information
- Creates a new access, a new refresh and a new idRefresh token for this session. These are set in the cookies and header of the res object.