import useTranslation from "next-translate/useTranslation"; import Head from "next/head"; import Link from "next/link"; import CookieBanner from "../../components/cookieBanner"; import Footer from "../../components/footer"; import Header from "../../components/header"; import Breadcrumbs from "../../components/breadcrumbs"; import { useRouter } from "next/router"; import { getCsrfToken } from "next-auth/react"; const Error = (props) => { let { t, lang } = useTranslation(); const { footerLinks, pages, csrfToken } = props; const { error } = useRouter().query; const errors = { Signin: "Try signing with a different account.", OAuthSignin: "Try signing with a different account.", OAuthCallback: "Try signing with a different account.", OAuthCreateAccount: "Try signing with a different account.", EmailCreateAccount: "Try signing with a different account.", Callback: "Try signing with a different account.", OAuthAccountNotLinked: "To confirm your identity, sign in with the same account you used originally.", EmailSignin: "Check your email address.", CredentialsSignin: "Sign in failed. Check the details you provided are correct.", Verification: "Unable to sign in. The sign in link is no longer valid.It may have been used already or it may have expired. ", default: "Unable to sign in.", }; const errorMessage = error && (errors[error] ?? errors.default); return (
Sign in Error - {t("common:service-name")}

There has been an error

{errorMessage}
{" "} Return to Home
); }; export async function getServerSideProps(context) { const csrfToken = await getCsrfToken(context); return { props: { csrfToken }, }; } export default Error;