"use client" import { useSearchParams } from "next/navigation" import { Button } from "@/components/ui/button" import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" import { Alert, AlertDescription } from "@/components/ui/alert" import { AlertTriangle } from "lucide-react" import Link from "next/link" const errorMessages = { Configuration: "There is a problem with the server configuration.", AccessDenied: "You do not have permission to sign in.", Verification: "The verification token has expired or has already been used.", Default: "An error occurred during authentication.", } export default function AuthError() { const searchParams = useSearchParams() const error = searchParams.get("error") as keyof typeof errorMessages const errorMessage = errorMessages[error] || errorMessages.Default return (
Authentication Error There was a problem signing you in
{errorMessage}
{error && (

Error code: {error}

)}
) }