From 30b5f99d6ffe5668ba464ce354eab5a02eb348e7 Mon Sep 17 00:00:00 2001 From: Paul Rodwell Date: Fri, 25 Nov 2016 17:34:24 +0000 Subject: [PATCH] make sure user is set also set to an empty map first to ensure we get what we expect --- server/social.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/social.coffee b/server/social.coffee index cdf53f4..7bffec5 100644 --- a/server/social.coffee +++ b/server/social.coffee @@ -403,7 +403,8 @@ module.exports = exports = (log, loga, argv) -> app.get '/auth/addAuthDialog', (req, res) -> # only makes sense to add alternative authentication scheme if # this the user is authenticated - if getUser(req) + user = getUser(req) + if user referer = req.headers.referer currentSchemes = _.keys(user)