1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 18:29:27 +02:00

server/mw/oauth: res.loc.auth to true upon auth

Setting res.locals.authenticated explicity to
true makes it's more clear whether the req is
authenticated when using optionalAuthenticate
middlware.
This commit is contained in:
kontrollanten 2020-12-04 22:13:11 +01:00 committed by Chocobozzz
parent f17faefb30
commit 2805cb7cb6
2 changed files with 3 additions and 1 deletions

View file

@ -53,7 +53,7 @@ describe('Test plugin helpers', function () {
statusCodeExpected: 200
})
expect(res.body.isAuthenticated).to.equal(undefined)
expect(res.body.isAuthenticated).to.equal(true)
const secRes = await makeGetRequest({
url: server.url,