Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

292
Vistas
prevent multiple login Codeigniter 4

i want to make login system, and check if user is multiple login and give notification " account already login in other device" in current user login. how to make system like that? I've searched for it on google but couldn't find the right one

check if user is multiple login and give notification " account already login in other device" in current user login

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Problem:

You can't really tell when the user is still logged in because the stateless server. Lets say I log in inside an incognito window. When I close the session cookie is deleted. But on the server it's still exists. How do you tell I'm actually logged in or not?

Solution:

You can make a heartbeat request to the server and log the activity. So you have a JS code sending request in every minute so you know the user is online. Also in every request you set the cookie as well.

So you log the last activity time in every minute and every request. When the user tries to log in you check if the logged activity is older than two minutes.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda