From 59130cc4d5942e4e0ca6f9eced3f2f6638332f31 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Mon, 15 Feb 2021 01:15:30 +0100 Subject: [PATCH] test --- packages/dashboard/src/pages/api/accounts/authenticate.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/dashboard/src/pages/api/accounts/authenticate.js b/packages/dashboard/src/pages/api/accounts/authenticate.js index d3412dbd..55c8266b 100644 --- a/packages/dashboard/src/pages/api/accounts/authenticate.js +++ b/packages/dashboard/src/pages/api/accounts/authenticate.js @@ -7,14 +7,11 @@ export default async (req, res) => { .post("http://oathkeeper:4455/login") .set("cookie", `ory_kratos_session=${req.cookies.ory_kratos_session}`); - console.log("auth.header", auth.header); res.setHeader("Set-Cookie", auth.header["set-cookie"]); res.redirect(req.query.return_to ?? "/"); } catch (error) { - console.log("error", error); - - // res.redirect(302, "/auth/login"); // credentials were correct but accounts service failed - res.redirect("/"); // credentials were correct but accounts service failed + // credentials were correct but accounts service failed + res.redirect("/.ory/kratos/public/self-service/browser/flows/logout"); } } else { res.redirect("/auth/login"); // redirect to login page if kratos session is missing