'use client' import { useSearchParams } from 'next/navigation' import Link from 'next/link' import { Suspense } from 'react' function ErrorContent() { const searchParams = useSearchParams() const error = searchParams.get('error') const getErrorMessage = (errorCode: string | null) => { switch (errorCode) { case 'Configuration': return 'There is a problem with the server configuration.' case 'AccessDenied': return 'You do not have permission to sign in.' case 'Verification': return 'The verification token has expired or has already been used.' case 'OAuthSignin': return 'Error in constructing an authorization URL.' case 'OAuthCallback': return 'Error in handling the response from an OAuth provider.' case 'OAuthCreateAccount': return 'Could not create OAuth provider user in the database.' case 'EmailCreateAccount': return 'Could not create email provider user in the database.' case 'Callback': return 'Error in the OAuth callback handler route.' case 'OAuthAccountNotLinked': return 'Email on the account is already linked, but not with this OAuth account.' case 'EmailSignin': return 'Sending the email with the verification token failed.' case 'CredentialsSignin': return 'Invalid email or password. Please check your credentials and try again.' case 'SessionRequired': return 'Please sign in to access this page.' default: return 'An authentication error occurred. Please try again.' } } return (

Authentication Error

{getErrorMessage(error)}

Try Logging In Again Create New Account
{error && (

Error code: {error}

)}
) } export default function AuthErrorPage() { return (
Loading...
}>
) }