settings
This commit is contained in:
parent
f2a10b07b3
commit
6cbe8323d4
|
@ -23,20 +23,20 @@ export async function getServerSideProps(context) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// console.log("headers", context.req.headers);
|
// console.log("headers", context.req.headers);
|
||||||
const { data: session } = await kratos.whoami(context.req.headers.cookie, context.req.headers.authorization);
|
// const { data: session } = await kratos.whoami(context.req.headers.cookie, context.req.headers.authorization);
|
||||||
console.log(JSON.stringify(session));
|
// console.log(JSON.stringify(session));
|
||||||
return { flow: "NOT YET" };
|
// return { flow: "NOT YET" };
|
||||||
// const { status, data } = await kratos.getSelfServiceSettingsFlow(flow);
|
const { status, data } = await kratos.getSelfServiceSettingsFlow(flow);
|
||||||
|
|
||||||
// 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}`);
|
throw new Error(`Failed to retrieve flow ${flow} with code ${status}`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return {
|
return {
|
||||||
redirect: {
|
// redirect: {
|
||||||
permanent: false,
|
// permanent: false,
|
||||||
destination: `${config.kratos.browser}/self-service/settings/browser`,
|
// destination: `${config.kratos.browser}/self-service/settings/browser`,
|
||||||
},
|
// },
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue