/** * Auth error boundary -- catches OAuth and authentication flow errors. * Common triggers: expired tokens, revoked access, PDS unavailable. * Next.js requires a default export for error boundaries. */ 'use client' import { useEffect } from 'react' import Link from 'next/link' import { WarningCircle, ArrowClockwise, SignIn } from '@phosphor-icons/react' import { reportError } from '@/lib/error-reporting' export default function AuthError({ error, reset, }: { error: Error & { digest?: string } reset: () => void }) { useEffect(() => { reportError(error, { boundary: 'auth' }) }, [error]) const message = process.env.NODE_ENV === 'development' ? error.message : 'There was a problem with authentication. This can happen when a session expires or the identity provider is unavailable.' return ( <> Error | Barazo
) }