From 592ec420a4afcf12cbae5d04774502820e326b98 Mon Sep 17 00:00:00 2001 From: robertjd Date: Mon, 11 Jun 2018 10:01:54 -0700 Subject: [PATCH] fix[oidc-middleware]: Removed next() in ensureAuthenticated This `next()` call was causing the "Cannot set headers after they are sent to the client" error --- packages/oidc-middleware/src/oidcUtil.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/oidc-middleware/src/oidcUtil.js b/packages/oidc-middleware/src/oidcUtil.js index 16dbca48d..c0a9b6347 100644 --- a/packages/oidc-middleware/src/oidcUtil.js +++ b/packages/oidc-middleware/src/oidcUtil.js @@ -95,7 +95,6 @@ oidcUtil.ensureAuthenticated = (context, options) => { ensureLoggedIn(options)(req, res, next); } else { res.sendStatus(401); - next(); } }; }