Joining auth.user on foreign key id?

Hello,

I think this might be me misunderstanding usage, but just in case.

I have a table teams that has a column
user_id
that is a foreign key to auth.user.id.

I want to select from teams and join the auth.user.email where the
user_id
matches the auth.user.id.

const { error, data } = await supabase.from('teams').select('*, user_id:user(email)'); 


I'm guessing it's a syntax issue, it does run, but it tries to refer to a users table in the public schema whereas it exists in the auth schema?

Thanks for any help.

Connor
Was this page helpful?