From 5ae6f8fc407f11b686fcb86ba2ecc9ad7aab15b0 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Thu, 1 Apr 2021 22:46:41 +0200 Subject: [PATCH] host --- packages/dashboard/src/pages/api/accounts/login.js | 2 ++ packages/dashboard/src/pages/auth/login.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/dashboard/src/pages/api/accounts/login.js b/packages/dashboard/src/pages/api/accounts/login.js index 4890d52b..5f54c459 100644 --- a/packages/dashboard/src/pages/api/accounts/login.js +++ b/packages/dashboard/src/pages/api/accounts/login.js @@ -10,6 +10,8 @@ export default async (req, res) => { res.setHeader("Set-Cookie", header["set-cookie"]); res.redirect(req.query.return_to ?? "/"); } catch (error) { + console.log(error); + // credentials were correct but accounts service failed res.redirect("/.ory/kratos/public/self-service/browser/flows/logout"); } diff --git a/packages/dashboard/src/pages/auth/login.js b/packages/dashboard/src/pages/auth/login.js index 481f8d44..f45045c9 100644 --- a/packages/dashboard/src/pages/auth/login.js +++ b/packages/dashboard/src/pages/auth/login.js @@ -32,6 +32,8 @@ export async function getServerSideProps(context) { throw new Error(`Failed to retrieve flow ${flow} with code ${status}`); } catch (error) { + console.log(error); + return { redirect: { permanent: false,