settings
This commit is contained in:
parent
35bc5ab7f7
commit
2ccfcb5751
|
@ -23,7 +23,7 @@ export default function SelfServiceForm({ config, fieldsConfig, title }) {
|
||||||
)}
|
)}
|
||||||
<div>
|
<div>
|
||||||
<input
|
<input
|
||||||
id={field.name}
|
id={field.type === "hidden" ? null : field.name}
|
||||||
name={field.name}
|
name={field.name}
|
||||||
type={field.type}
|
type={field.type}
|
||||||
autoComplete={field.autoComplete}
|
autoComplete={field.autoComplete}
|
||||||
|
|
|
@ -2,10 +2,11 @@ import { Configuration, PublicApi } from "@ory/kratos-client";
|
||||||
import Layout from "../components/Layout";
|
import Layout from "../components/Layout";
|
||||||
import config from "../config";
|
import config from "../config";
|
||||||
import SelfServiceForm from "../components/Form/SelfServiceForm";
|
import SelfServiceForm from "../components/Form/SelfServiceForm";
|
||||||
|
import authServerSideProps from "../services/authServerSideProps";
|
||||||
|
|
||||||
const kratos = new PublicApi(new Configuration({ basePath: config.kratos.public }));
|
const kratos = new PublicApi(new Configuration({ basePath: config.kratos.public }));
|
||||||
|
|
||||||
export async function getServerSideProps(context) {
|
export const getServerSideProps = authServerSideProps(async (context) => {
|
||||||
const flow = context.query.flow;
|
const flow = context.query.flow;
|
||||||
|
|
||||||
if (process.env.NODE_ENV === "development") {
|
if (process.env.NODE_ENV === "development") {
|
||||||
|
@ -41,7 +42,7 @@ export async function getServerSideProps(context) {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
const fieldsConfig = {
|
const fieldsConfig = {
|
||||||
"traits.email": {
|
"traits.email": {
|
||||||
|
|
Reference in New Issue