Permalink
Browse files

make sessions permanent with a lifetime of 1 year

  • Loading branch information...
1 parent 67903fa commit bfcdb4a15b8a0e60b3a3b95b1c83512fc6c63a2e @artnez committed May 13, 2012
Showing with 2 additions and 0 deletions.
  1. +1 −0 src/faceoff/config.py
  2. +1 −0 src/faceoff/models/user.py
View
@@ -12,6 +12,7 @@
DEBUG = os.getenv('FACEOFF_DEBUG') == '1'
SERVER_NAME = 'faceoff.dev:5000'
SECRET_KEY = '89a1100b5a62059021260a75738e6e61' if DEBUG else os.urandom(24)
+PERMANENT_SESSION_LIFETIME = 60*60*24*365
# logging
LOG_LEVEL = os.getenv('FACEOFF_LOG_LEVEL')
@@ -63,6 +63,7 @@ def auth_login(db, session, nickname, password):
if password != user['password']:
return False
session['user_id'] = user['id']
+ session.permanent = True
return True
def auth_logout(session):

0 comments on commit bfcdb4a

Please sign in to comment.