Kinde + supabase
Which is the best way to implement supabase with Kinde?
This method looks like the users id directly syncs with supabases user_id? - https://kinde.com/blog/engineering/kinde-with-supabase/
This method looks like it keeps the id from kinde seperate from supabase - https://youtu.be/E9sN9Wol3GI?si=cOl66FLgIxMuQ0OU
Am I correct in my thinking?
Is one way better than another? The blog seems like the way to go here?
Kinde Blog
Kinde with Supabase
Learn how to integrate Kinde authentication with Supabase, utilizing PostgreSQL's Row Level Security (RLS) policies.
3 Replies
What I’m trying to find is a way to use kinde but have supabase and kinde user id’s in sync
I'll see if I can grab Peter - the star of the video - to answer here. Bear with us.
There are 2 main ways I have done it:
1. set the login redirect url to something like
/api/auth-success
which handles adding a new user to supabase with the kinde id and then redirects to your app accordingly. You will have to do a DB call to check if the user already exists
2. set up a webhook to listen to user created events, and then insert into your supabase db with the user id