No commit activity in last 3 years
No release in over 3 years
Ember-auth timeoutable module source code wrapper for ruby libs.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

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()

License

MIT