             user = id: profile.id
             break
 
-    USERS[user.id] = user if user
+    if !use_redis_store
+      USERS[user.id] = user if user
 
     done null, user
 


{ensureLoggedIn}    = require 'connect-ensure-login'


# Configure google login
protocol = if process.env.USE_SSL is '1' then 'https' else 'http'


###
# In-memory user database store. Such web scales, very wow.
# This is only used if USE_REDIS_SESSION is set to 0.
###
USERS = {}

