Hi all! Exploring the Supabase and it looks really...
# sql
d
Hi all! Exploring the Supabase and it looks really nice, but have a question regarding the SQL part. I'm implementing the custom auth flow. I also want to support Supabase native authentication methods at the same time. So the idea is to plug users from my flow into
auth.users
table so that I can reference both native auth and my auth users from the same table. I dont get how to add documents into
auth.users
. Should it be some custom trigger?
s
How are you implementing your own auth flow?
d
I utilise the crypto wallet signature and provide a JWT token.
s
Is this happening on the server side of your app or inside a Postgres function?
d
Sorry for not being detailed enough. This is happening on the server side.
Currently, I have a separate table for users who logged in via the wallet at
public.wallet_auth
where I create uuid for them. Would it make sense to put a trigger on it to push a new entry to
auth.users
? I basically want to create a user profiles which would reference the uuid from
auth.users
to ensure the integrity
I'm not sure what's the best practise here, maybe it's a bad idea to mix
auth.users
with custom flow auth in the first place? Especially, considering that wallet auth is coming.
s
Hmm this might be a bit tricky, but you would need to make sure you are using the same hash mechanism for passwords as Supabase is using when storing an entry inside of the
auth.users
table
d
Got it thanks! I decided to go with with separate table for wallet auth users for the sake of simplicity.