How to Block Multiple Logins for the Same User

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
haitalla
Posts: 8
Joined: 2023-04-04 11:38

How to Block Multiple Logins for the Same User

Post by haitalla » 2024-09-15 21:42

Hi,

I’m currently developing an application using AppGini and I would like to block a user from logging in if they are already connected from another session. Could you please guide me on how to implement this feature within the AppGini framework?

Thanks for your help!

User avatar
D Oliveira
AppGini Super Hero
AppGini Super Hero
Posts: 351
Joined: 2018-03-04 09:30
Location: David

Re: How to Block Multiple Logins for the Same User

Post by D Oliveira » 2024-09-17 19:33

Create a server side unique session token on login and store it in the database for that user and locally (cookie), on every page load check if the cached token matches the token in the db , if another login happens the token should be overwritten and the previous user can then be logged out once he loads another page

Post Reply