MCPcopy Create free account
hub / github.com/alanagoyal/docbase / AuthRefresh

Function AuthRefresh

components/auth-refresh.tsx:7–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5import { createClient } from "@/utils/supabase/client"
6
7export default function AuthRefresh() {
8 const supabase = createClient()
9 const router = useRouter()
10
11 useEffect(() => {
12 supabase.auth.onAuthStateChange((event) => {
13 if (event === "SIGNED_IN") {
14 router.refresh()
15 }
16 })
17 }, [])
18
19 return null
20}

Callers

nothing calls this directly

Calls 1

createClientFunction · 0.90

Tested by

no test coverage detected