From 2764e11a85ef56720e3ca05a7d4222c8c16c181d Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Wed, 17 Feb 2021 14:11:03 +0100 Subject: [PATCH] settings --- packages/dashboard/src/pages/settings.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/dashboard/src/pages/settings.js b/packages/dashboard/src/pages/settings.js index a752e4b1..e3edd1f4 100644 --- a/packages/dashboard/src/pages/settings.js +++ b/packages/dashboard/src/pages/settings.js @@ -29,10 +29,13 @@ export async function getServerSideProps(context) { ); console.log("session", JSON.stringify(session)); console.log("headers", JSON.stringify(headers)); - // return { flow: "NOT YET" }; - // const { status, data } = await kratos.getSelfServiceSettingsFlow(flow); + const { status, data } = await kratos.getSelfServiceSettingsFlow(flow, { + headers: { cookie: context.req.headers.cookie }, + }); + console.log("status", status); + console.log("data", data); - // if (status === 200) return { props: { flow: data } }; + if (status === 200) return { props: { flow: data } }; throw new Error(`Failed to retrieve flow ${flow} with code ${status}`); } catch (error) {