From b108faed5e398fd4228e7395ac01032ea17c2782 Mon Sep 17 00:00:00 2001 From: Cristian Dean Date: Tue, 30 Jul 2019 20:39:30 -0300 Subject: [PATCH] Fix logout action when no local authentication provider (#2435) --- src/core/server/app/handlers/api/auth/local/index.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/core/server/app/handlers/api/auth/local/index.ts b/src/core/server/app/handlers/api/auth/local/index.ts index 47b49a1a1..d07173fec 100644 --- a/src/core/server/app/handlers/api/auth/local/index.ts +++ b/src/core/server/app/handlers/api/auth/local/index.ts @@ -1,10 +1,9 @@ import { AppOptions } from "coral-server/app"; import { handleLogout } from "coral-server/app/middleware/passport"; -import { IntegrationDisabled } from "coral-server/errors"; import { RequestHandler } from "coral-server/types/express"; -export * from "./signup"; export * from "./forgot"; +export * from "./signup"; export type LogoutOptions = Pick; @@ -12,14 +11,6 @@ export const logoutHandler = ({ redis, }: LogoutOptions): RequestHandler => async (req, res, next) => { try { - // Tenant is guaranteed at this point. - const tenant = req.coral!.tenant!; - - // Check to ensure that the local integration has been enabled. - if (!tenant.auth.integrations.local.enabled) { - throw new IntegrationDisabled("local"); - } - // Get the user on the request. const user = req.user; if (!user) {