rp_st
11/23/2021, 9:48 AMcreateNewSession
function from the session recipe
- in the override, one of the the inputs to that function is the userId
. You want to fetch all existing sessions of that user, if that array has length == 0, then you can call the original implementation (of createNewSession), else you can call the revokeSession function for all the existing sessions of that user, and then call the original implementation (of createNewSession)