import { useAuth } from '@/contexts/AuthContext'; import { Button } from '@/components/ui/button'; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; import { LogIn, Shield } from 'lucide-react'; export function Auth() { const { login, isLoading, error } = useAuth(); const handleSSOLogin = async () => { // Clear any existing session data localStorage.clear(); sessionStorage.clear(); try { await login(); } catch (loginError) { console.error('========================================'); console.error('LOGIN ERROR'); console.error('Error details:', loginError); console.error('Error message:', (loginError as Error)?.message); console.error('Error stack:', (loginError as Error)?.stack); console.error('========================================'); } }; if (error) { console.error('Auth0 Error in Auth Component:', { message: error.message, error: error }); } return (
Authentication Error
{error.message}
Secure Single Sign-On
Powered by Auth0