GitXplorerGitXplorer
j

meteor-waning-session

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
23af660d4674b283c5402387ce18f8e9b32ddbe2

updates

committed 9 years ago
Unverified
e1abaed9fb68bc809192716018086a9c43e6d09a

make multiple tabs login / logout / and stay logged in

committed 9 years ago
Unverified
ee84d7a7f271634db38811541117d63de9412efb

allow ignoring of certain roles

committed 9 years ago
Unverified
e395b27855ff2fa2fdd4e591b80e6045b8c2ff5a

update readme

committed 9 years ago
Unverified
cd679129365e68a3010ca5bba56969b9079db95c

update readme

committed 9 years ago
Unverified
8da058c0510ecf967f4ae9fb7b3c35202c7c706a

check time against the right item

committed 9 years ago

README

The README file for this repository.

Waning Session

Logs out a user a specified period of inactivity. Done all client-side.

It works by tracking any of the following events on the body tag of the document.

  • mousemove
  • click
  • keydown
  • touchstart

These can be further configured if need be.

You can configure the following options for timeout and

{
  "public": {
    "waningInactivityTimeout": 1200, // seconds
    "waningSessionModalTimeout": 60, // seconds
    "waningActivityEvents": "mousemove click keydown touchstart",
    "waningMasterRoles": "dontLogOutThisRole"
  }
}

Include the following template somewhere that is accessible across the setInterval

{{> waningSessionLogoutModal}}

You can customize the modal with the following attributes

{{#waningSessionLogoutModal title="Your Title" button="Your Button Text"}}
  <p>Content Block</p
{{/waningSessionLogoutModal}}

Otherwise defaults are used.

Requires a bootstrap modal package in order to work. There are quite a few options that can be used.

Some inspiration taken from (stale-session)[https://github.com/lindleycb/meteor-stale-session].

To use debug output

{
  "public": {
    waningSessionDebug: true
  }
}

TODO