Skip to content

Provides a UserSession object that works just like Session does, except it's persistent so you can preserve state across devices *and* sessions.

Notifications You must be signed in to change notification settings

BenjaminRH/meteor-user-session

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

User Session - Meteor Smart Package

Provides a UserSession object that works just like Session does, except it's persistent so you can preserve state across devices and sessions. It also provides a few extra useful methods.

API

NOTE: All of the methods defined below are also available on the server, with an additional userId argument to specify which user's session variables you want to edit.

  • UserSession.set(key, value [, server: userId]) ( anywhere ) - Set a new variable in the user session
  • UserSession.get(key [, server: userId]) ( anywhere ) - Get the value of a user session variable
  • UserSession.delete(key [, server: userId]) ( anywhere ) - Delete a user session variable, if it exists
  • UserSession.equals(key, value [, server: userId]) ( anywhere ) - Test if a user session variable is equal to a value
  • UserSession.list([server: userId]) ( anywhere ) - Get all the user session variables as an object

How to use?

  1. Install meteorite
  2. mrt add user-session

Authors

  • BenjaminRH
  • digilord

About

Provides a UserSession object that works just like Session does, except it's persistent so you can preserve state across devices *and* sessions.

Resources

Stars

Watchers

Forks

Packages

No packages published