From 918a95071d9a0d70383ab9e7457a2d5465eb38e5 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 29 Jan 2021 13:14:36 +0000 Subject: [PATCH] Fixing a bug found by tests in auth. --- packages/server/src/middleware/authenticated.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/server/src/middleware/authenticated.js b/packages/server/src/middleware/authenticated.js index e2061c8eb5..e4e678abad 100644 --- a/packages/server/src/middleware/authenticated.js +++ b/packages/server/src/middleware/authenticated.js @@ -29,7 +29,8 @@ module.exports = async (ctx, next) => { if (!isClient(ctx)) { token = ctx.cookies.get(getCookieName()) authType = AuthTypes.BUILDER - } else if (appId) { + } + if (!token && appId) { token = ctx.cookies.get(getCookieName(appId)) authType = AuthTypes.APP }