mirror of
https://github.com/lucasrcsantana/story-generator.git
synced 2026-02-04 13:50:52 +00:00
28 lines
756 B
TypeScript
28 lines
756 B
TypeScript
import { useEffect } from 'react';
|
|
import { useNavigate } from 'react-router-dom';
|
|
import { supabase } from '../lib/supabase';
|
|
|
|
export function AuthCallback() {
|
|
const navigate = useNavigate();
|
|
|
|
useEffect(() => {
|
|
supabase.auth.onAuthStateChange((event, session) => {
|
|
if (event === 'SIGNED_IN') {
|
|
navigate('/dashboard');
|
|
}
|
|
});
|
|
}, [navigate]);
|
|
|
|
return (
|
|
<div className="min-h-screen flex items-center justify-center">
|
|
<div className="text-center">
|
|
<h2 className="text-2xl font-semibold text-gray-900">
|
|
Verificando autenticação...
|
|
</h2>
|
|
<p className="mt-2 text-gray-600">
|
|
Por favor, aguarde enquanto confirmamos seu acesso.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|