From 340f418eb3ece402f390cbb80ce0aae765547ee8 Mon Sep 17 00:00:00 2001 From: Arthur DANJOU Date: Fri, 8 Oct 2021 14:58:47 +0200 Subject: [PATCH] Add double check in middleware --- app/Middleware/SilentAuth.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Middleware/SilentAuth.ts b/app/Middleware/SilentAuth.ts index a30e106..14f822e 100755 --- a/app/Middleware/SilentAuth.ts +++ b/app/Middleware/SilentAuth.ts @@ -15,7 +15,8 @@ export default class SilentAuthMiddleware { * Check if user is logged-in or not. If yes, then `ctx.auth.user` will be * set to the instance of the currently logged in user. */ - await auth.check() + await auth.use('api').check() + await auth.use('web').check() await next() } }