© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•13mo ago•
2 replies
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>
    );
}
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

auth-ui-react loading animation
SupabaseSSupabase / help-and-questions
4y ago
auth-ui-react sign_up form
SupabaseSSupabase / help-and-questions
4y ago
Show passwords toggle auth ui in react
SupabaseSSupabase / help-and-questions
3y ago
Auth Ui
SupabaseSSupabase / help-and-questions
4y ago