I have a request from my customer: 'Prevent multi user with same account id login at the same time'. I have implemented like this: create userflag in account table. When user login, flag is active (1). The other can't login when flag was 1. When user log out, the flag is deactive(0).
But I have trouble when user doesn't logout. If he directly close browser, the flag still active. Could you give me some advised to fix this problem ?
Besides, in asp.net core, I can't find something like SessionEnd event, because I want whenever sessionend, I'll return flag of user in DB, but I can't find it. Please give me some advised. Thanks