log flow
This commit is contained in:
parent
75445923c8
commit
c6b992b34e
|
@ -29,8 +29,6 @@ export async function getServerSideProps(context) {
|
||||||
try {
|
try {
|
||||||
const { status, data } = await kratos.getSelfServiceLoginFlow(flow);
|
const { status, data } = await kratos.getSelfServiceLoginFlow(flow);
|
||||||
|
|
||||||
console.log("flow", 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}`);
|
throw new Error(`Failed to retrieve flow ${flow} with code ${status}`);
|
||||||
|
@ -71,6 +69,8 @@ export default function Login({ flow }) {
|
||||||
initialValues: fields.reduce((acc, field) => ({ ...acc, [field.name]: field.value }), {}),
|
initialValues: fields.reduce((acc, field) => ({ ...acc, [field.name]: field.value }), {}),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log("flow", flow);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="min-h-screen bg-gray-50 flex flex-col justify-center py-12 sm:px-6 lg:px-8">
|
<div className="min-h-screen bg-gray-50 flex flex-col justify-center py-12 sm:px-6 lg:px-8">
|
||||||
<div className="sm:mx-auto sm:w-full sm:max-w-md">
|
<div className="sm:mx-auto sm:w-full sm:max-w-md">
|
||||||
|
|
|
@ -29,8 +29,6 @@ export async function getServerSideProps(context) {
|
||||||
try {
|
try {
|
||||||
const { status, data } = await kratos.getSelfServiceRegistrationFlow(flow);
|
const { status, data } = await kratos.getSelfServiceRegistrationFlow(flow);
|
||||||
|
|
||||||
console.log("flow", 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}`);
|
throw new Error(`Failed to retrieve flow ${flow} with code ${status}`);
|
||||||
|
@ -81,6 +79,8 @@ export default function Registration({ flow }) {
|
||||||
initialValues: fields.reduce((acc, field) => ({ ...acc, [field.name]: field.value }), {}),
|
initialValues: fields.reduce((acc, field) => ({ ...acc, [field.name]: field.value }), {}),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log("flow", flow);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="min-h-screen bg-gray-50 flex flex-col justify-center py-12 sm:px-6 lg:px-8">
|
<div className="min-h-screen bg-gray-50 flex flex-col justify-center py-12 sm:px-6 lg:px-8">
|
||||||
<div className="sm:mx-auto sm:w-full sm:max-w-md">
|
<div className="sm:mx-auto sm:w-full sm:max-w-md">
|
||||||
|
|
Reference in New Issue