klg-asutk-app/app/callback/page.tsx

25 lines
857 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

'use client';
import { useEffect } from 'react';
import { useRouter } from 'next/navigation';
export default function OIDCCallbackPage() {
const router = useRouter();
useEffect(() => {
// The useOIDCAuth hook in providers.tsx handles the code exchange.
// This page just shows a loading state while that happens.
const timeout = setTimeout(() => router.push('/dashboard'), 3000);
return () => clearTimeout(timeout);
}, [router]);
return (
<div className="min-h-screen flex items-center justify-center bg-gray-100">
<div className="text-center">
<div className="text-4xl mb-4">🔐</div>
<h2 className="text-lg font-bold text-primary-500 mb-2">Авторизация...</h2>
<p className="text-sm text-gray-500">Выполняется вход в систему</p>
</div>
</div>
);
}