https://supabase.com/ logo
Users Authentication
e

Esore

05/25/2023, 3:52 AM
How do I edit the users table within the schema.auth table? I am trying to be able to grab the information from the schema.auth table and tie it into my schema.public table so I can use the Id from the schema.auth to tie that to say products so that this specific user has products...I hope that makes sense. any help would be great
model Account {
  id String @id @default(uuid())
  users User[]
  products Product[]
  @@schema("public")
}

model User {
  id String @id @default(uuid())
  email String @unique
  name String?
  accountId String?
  account Account? @relation(fields: [accountId], references:[id])
  @@schema("public")
}

model Product {
id String @id @default(uuid())
name String
price Int
accountId String?
account Account? @relation(fields: [accountId], references:[id])
@@schema("public")
}
As you can see, when I use the Supabase Authentication, I want it that It creates a user and with that make them an admin of an account. So that I can add more users within a specific account and products
u

49Ryann

05/25/2023, 4:38 AM
Maybe watch this video:

https://youtu.be/0N6M5BBe9AE?t=220