Activity
Mon
Wed
Fri
Sun
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
What is this?
Less
More

Memberships

AI Automation Agency Hub

274.8k members • Free

AI Accelerator

16.2k members • Free

No Code Agents

404 members • $9/m

AI Automation Society

208.5k members • Free

University of Code

5.3k members • Free

1 contribution to University of Code
Help Needed: Clerk-Supabase User Sync Issue in React App
Hey fellow devs! I'm hitting a wall with an authentication sync issue between Clerk and Supabase in my React/TS app. Could use some expert eyes on this problem: The Issue: When users sign up or log in, I'm getting this error: Authentication error: Supabase connection failed: invalid input syntax for type uuid: "user_..." Sometimes followed by: Error creating/updating user: new row violates row-level security policy for table "users" My Setup: - React/TS app using Clerk for auth and Supabase (DB/Storage) - Deployed a Supabase Edge Function (sync-clerk-user) that receives Clerk webhooks when users are created/updated - Configured Clerk webhook endpoints to point to this function - Function is designed to use the Supabase service role key to upsert Clerk userIDs into the public.users table What I've Done: 1. Successfully deployed the Edge Function using supabase functions deploy sync-clerk-user --no-verify-jwt 2. Set up the webhook URL in Clerk's dashboard 3. Confirmed the function deployment shows success in terminal output 4. Started the local dev server and tested signup/login What's Puzzling Me: Despite having the webhook setup apparently correct, the app still throws the UUID error - suggesting that either: 1. The webhook isn't being received/processed correctly 2. The function has a runtime error I can't see 3. My client code might be trying to access Supabase resources before the sync completes Questions: - How can I effectively debug if the Clerk webhook is actually firing and reaching my function? - Where should I look in Supabase/Clerk to find detailed logs of the webhook attempts? - Any common gotchas with Clerk-Supabase user mapping that I might be missing? If anyone has experience with this Clerk+Supabase pattern or debugging webhook issues, I'd really appreciate the help!
0 likes • Apr 21
Thanks so much for the advice @Mark Sikaundi and Likhit Tanishq.
1-1 of 1
Dylan Maart
1
3points to level up
@dylan-maart-8754
I am a South African business owner. I started my AI Agency to provide DM automation services to real estate agents.

Active 224d ago
Joined Mar 6, 2025
Powered by