aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--server/middlewares/oauth.ts2
-rw-r--r--server/tests/plugins/plugin-router.ts2
2 files changed, 3 insertions, 1 deletions
diff --git a/server/middlewares/oauth.ts b/server/middlewares/oauth.ts
index ab5301415..ffc1b7ca9 100644
--- a/server/middlewares/oauth.ts
+++ b/server/middlewares/oauth.ts
@@ -20,6 +20,8 @@ function authenticate (req: express.Request, res: express.Response, next: expres
20 .end() 20 .end()
21 } 21 }
22 22
23 res.locals.authenticated = true
24
23 return next() 25 return next()
24 }) 26 })
25} 27}
diff --git a/server/tests/plugins/plugin-router.ts b/server/tests/plugins/plugin-router.ts
index 5392acc51..24e6a1e83 100644
--- a/server/tests/plugins/plugin-router.ts
+++ b/server/tests/plugins/plugin-router.ts
@@ -53,7 +53,7 @@ describe('Test plugin helpers', function () {
53 statusCodeExpected: 200 53 statusCodeExpected: 200
54 }) 54 })
55 55
56 expect(res.body.isAuthenticated).to.equal(undefined) 56 expect(res.body.isAuthenticated).to.equal(true)
57 57
58 const secRes = await makeGetRequest({ 58 const secRes = await makeGetRequest({
59 url: server.url, 59 url: server.url,