Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

ember-auth-module-timeoutable

1.0.2 • Public • Published

timeoutable module for ember-auth

Build Status Gem Version NPM version

Timeout a signed in session after a specified period.

Config

App.Auth = Em.Auth.extend
  modules: ['timeoutable']
 
  timeoutable:
    # [number] (opt) Period (mins) before timing out a signed in session; 
    #   default: 20 
    period: 20
 
    # [function] (opt) Method to call for timing out a signed in session; 
    #   default: (auth).signOut() 
    callback: null

Usage

# Low-level methods for manual use 
 
# reset the timeout period 
@auth.get('module.timeoutable').reset()
 
# register a new timeout (and cancel any previously registered timeout) 
@auth.get('module.timeoutable').register()
 
# cancel any registered timeout 
@auth.get('module.timeoutable').clear()

Keywords

none

Install

npm i ember-auth-module-timeoutable

DownloadsWeekly Downloads

4

Version

1.0.2

License

none

Last publish

Collaborators

  • avatar