Dee
08/03/2020, 6:10 AMrp
08/03/2020, 6:13 AMsupertokens.getAllSessionsForUser(userId)
(in Node JS).
- If the returned array length is >= 1, then don't allow the user to login, else successfully log them in.
If you want this to be race condition proof, then in your login API, after you check the user's password, then you should take a distributed lock on the userId, and then do the above check.rp
08/03/2020, 6:14 AMrp
08/03/2020, 6:18 AMrp
08/05/2020, 2:17 PMuser
08/14/2020, 9:54 AMrp
08/14/2020, 10:51 AMrp
08/14/2020, 9:01 PMccccc
08/14/2020, 9:05 PMrp
08/14/2020, 9:05 PMccccc
08/14/2020, 9:05 PMccccc
08/14/2020, 9:06 PMccccc
08/14/2020, 9:06 PMrp
08/14/2020, 9:06 PMccccc
08/14/2020, 9:07 PMccccc
08/14/2020, 9:07 PMrp
08/14/2020, 9:08 PMrp
08/14/2020, 9:08 PMccccc
08/14/2020, 9:09 PMrp
08/14/2020, 9:10 PMccccc
08/14/2020, 9:11 PMrp
08/14/2020, 9:12 PMccccc
08/14/2020, 9:14 PMccccc
08/14/2020, 9:16 PMccccc
08/14/2020, 9:16 PMrp
08/14/2020, 9:19 PMrp
08/14/2020, 9:19 PMccccc
08/14/2020, 9:20 PMrp
08/14/2020, 9:20 PMccccc
08/14/2020, 9:24 PM