Skip to content

weareslate/agg-session-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

agg-session-manager

Session manager for Aggregate Industries

Usage

Session manager is a function and needs to be run (with optional config) when required:

config = {
    collection: 'usersessions', 
    sessionExtend: false, 
    sessionTimeout: 3600 // 1 hour
};
var userSessionManager = require('agg-session-manager')(sessionConfig);

Creating a session

userSessionManager.createSession(username, additionalData, function(err, token){
    if (err) {
    	return console.log(err);
    }
    console.log('Login successful for %s', username);
    console.log(token));
});

About

Session manager for Aggregate Industries

Resources

Stars

Watchers

Forks

Packages

No packages published