Skip to content

A library to trigger an action if the user is idle

License

Notifications You must be signed in to change notification settings

Fcmam5/hamid.js

Repository files navigation

HAMID.js

Mutation testing badge Known Vulnerabilities codecov npm

A library that triggers an action if the user is inactive after a period of time.

Use cases

Banking and payment services

PSD 2 regulation for example requires logging out the user if they're inactive for 5 minutes

The automatic logout after five minutes of inactivity is a regulatory requirement for banks and payment service providers under the PSD 2 regulation to increase security in online banking. See article 4(3)(d) of the DELEGATED REGULATION (EU) 2018/389 (RTS), https://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=CELEX:32018R0389&from=EN ("the maximum time without activity by the payer after being authenticated for accessing its payment account online shall not exceed 5 minutes."). [commerzbank]

Chat and online games

Online chat rooms, and games may have a requirement of triggering an action if a user is inactive for a set period of time.

Usage

Install the library using npm with npm i hamid.js, or you can use it from a CDN with:

    <script src="https://unpkg.com/browse/hamid.js@0.0.1/dist/lib.js"></script>

Then in your script

      const logMeOut = () => alert('You shall be logged out my friend');
      new Hamid(logMeOut);

Origin of the library's name

It's a local meme in Algeria, especially in Oran. It's a scene from a famous comedy show called "Bila Houdoud" where a bus driver asked his tickets man (Hamid) to kick-out someone.

Hamid Ser7ah from Bila Houdoud

License

MIT

About

A library to trigger an action if the user is idle

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy