Skip to content

Instantly share code, notes, and snippets.

@thevahidal
Last active October 29, 2023 09:55
Show Gist options
  • Save thevahidal/38cd3f5eceb6e8bc79b23e5daaffa50e to your computer and use it in GitHub Desktop.
Save thevahidal/38cd3f5eceb6e8bc79b23e5daaffa50e to your computer and use it in GitHub Desktop.
Next.js + Formik + MUI + NextAuth
import React, { useState } from "react";
import LoginForm from '../../components/LoginForm'
async function getServerSideCsrfToken()
{
const csrfToken = await getCsrfToken();
return csrfToken;
}
export default async function SignIn() {
const router = useRouter();
const csrfToken = await getServerSideCsrfToken();
return (
<div>
<LoginForm csrfToken={csrfToken} />
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment