Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

await createClient() promise in AuthButton.tsx (#30909)

abdellah hariti7cdbbdaf725b
diff --git a/examples/auth/nextjs/components/AuthButton.tsx b/examples/auth/nextjs/components/AuthButton.tsx
index d16f5fe8805..ec94bfd0bd4 100644
--- a/examples/auth/nextjs/components/AuthButton.tsx
+++ b/examples/auth/nextjs/components/AuthButton.tsx
@@ -12,7 +12,7 @@ export default async function AuthButton() {
const signOut = async () => {
'use server'
- const supabase = createClient()
+ const supabase = await createClient()
await supabase.auth.signOut()
return redirect('/login')
}