Files
sign/apps/web/pages/forgot-password.tsx

31 lines
635 B
TypeScript
Raw Normal View History

2023-06-05 12:50:11 +00:00
import Head from "next/head";
import { getUserFromToken } from "@documenso/lib/server";
import ForgotPassword from "../components/forgot-password";
2023-06-07 10:37:47 +00:00
export default function ForgotPasswordPage() {
2023-06-05 12:50:11 +00:00
return (
<>
<Head>
2023-06-05 14:17:45 +00:00
<title>Forgot Password | Documenso</title>
2023-06-05 12:50:11 +00:00
</Head>
2023-06-07 10:37:47 +00:00
<ForgotPassword />
2023-06-05 12:50:11 +00:00
</>
);
}
export async function getServerSideProps(context: any) {
const user = await getUserFromToken(context.req, context.res);
if (user)
return {
redirect: {
source: "/login",
destination: "/dashboard",
permanent: false,
},
};
return {
2023-06-07 10:37:47 +00:00
props: {},
2023-06-05 12:50:11 +00:00
};
}