S
Supabase9mo ago
patryk

auth-ui-react question

Short question. How could I run fetchUserSession() on <Auth> component successfull sign in? <Auth> doesn't have onSignIn() callback, so do I have to implement my own Auth components? Thanks! PS.: I can't use onAuthStateChange, because of a bug
import { Auth } from '@supabase/auth-ui-react'
export default function LoginPage() {

const { fetchUserSession } = useAuthContext()

return (
<div className="min-h-screen bg-white flex items-center justify-center p-4">
<div className="w-full max-w-md">
<h1 className="text-2xl font-bold text-center mb-8">Welcome to MedComply</h1>
<div className="bg-white p-8 rounded-lg shadow-md border border-gray-200">
<Auth
supabaseClient={supabaseClient}
appearance={{ theme: ThemeSupa }}
theme="light"
providers={[]}
/>
</div>
</div>
</div>
);
}
import { Auth } from '@supabase/auth-ui-react'
export default function LoginPage() {

const { fetchUserSession } = useAuthContext()

return (
<div className="min-h-screen bg-white flex items-center justify-center p-4">
<div className="w-full max-w-md">
<h1 className="text-2xl font-bold text-center mb-8">Welcome to MedComply</h1>
<div className="bg-white p-8 rounded-lg shadow-md border border-gray-200">
<Auth
supabaseClient={supabaseClient}
appearance={{ theme: ThemeSupa }}
theme="light"
providers={[]}
/>
</div>
</div>
</div>
);
}
2 Replies
silentworks
silentworks9mo ago
The repo says it's in maintenance mode. Meaning you shouldn't be using it.
patryk
patrykOP9mo ago
@silentworks I haven't noticed that, thanks for the info! Cheers

Did you find this page helpful?