Pricing Blog

Supabase Users ID

  • benajaephrath-1264841579412066336

    BenajaEphrath

    1 year ago

    I am currently following the tutorial https://youtu.be/SHJ3EadcrgY?si=eI_lOhHBkHgY7jzC and this is recommended there:

    In Supabase there is now another option and I am stuck.
    1264841580045533204-image.png
    1264841579806588989-image.png
  • benajaephrath-1264842154421780541

    BenajaEphrath

    1 year ago

    And after I have done this, the foreignKey is not automatically assigned to the column owner. What am I doing wrong?
    1264842154300276778-image.png
  • uunicode-1264870849911984273

    unicodes

    1 year ago

    @BenajaEphrath I would recommend allowing the ID to be generated randomly, because according to the table structure rules, it is better for each element in the table to have its own ID. Additionally, create a new column named auth_id as a Foreign Key to auth.id. The users.auth_id should reference auth.id.
  • lucasg-1264928927646875759

    Lucas G

    1 year ago

    Your id column can’t be null (or duplicate) since it is the primary key
  • lucasg-1264929663101440010

    Lucas G

    1 year ago

    gen_random_uuid()
  • That's the default for it, just leave that
  • and owner should be your foreign key
  • benajaephrath-1265204252297662567

    BenajaEphrath

    1 year ago

    Like this?
    1265204251932753950-image.png
  • benajaephrath-1265207747117318225

    BenajaEphrath

    1 year ago

    It is strange, the login is woring fine, but when i wanna get the Data, the API is not working. My Setup:
  • Tod-1265207748405235724

    Tod

    1 year ago

    Great energy @BenajaEphrath! Your continuous contribution to the toddle Community just made you advance to Community Level 1!
  • benajaephrath-1265207797604286485

    BenajaEphrath

    1 year ago

    1265207797411217422-image.png
  • I have set the policies
  • 1265208023031353395-image.png
  • The API Path, apiKey and Bearer
  • 1265208242259365898-image.png
  • 1265208280679055392-image.png
  • But there is no response
  • max.kayr-1265209427653562471

    Max

    1 year ago

    Hi! How did you set up your RLS? And did you log in from the Toddle editor or the app preview?
  • benajaephrath-1265210747827388437

    BenajaEphrath

    1 year ago

    Preview
  • Loading successful
  • 1265210872276451358-image.png
  • And yes i have installed and activated the toddle chrome extension
  • benajaephrath-1265213014353641555

    BenajaEphrath

    1 year ago

    @Max
    1265213014576201739-image.png
  • benajaephrath-1265213867013701675

    BenajaEphrath

    1 year ago

    Sorry, as i understand i have to login within the toddle editor, but same problem
  • 620608841435971601-@BenajaEphrath
    @Max
    max.kayr-1265213979467321387

    Max

    1 year ago

    Can you hop on a short call?
  • benajaephrath-1265214043246039041

    BenajaEphrath

    1 year ago

    Sure
  • 620608841435971601-@BenajaEphrath
    Sure
    max.kayr-1265214105199968266

    Max

    1 year ago

    I'll DM
    👌1
  • benajaephrath-1265230494291857438

    BenajaEphrath

    1 year ago

    Thanks @Max it works fine
    1265230494102982768-image.png
    💪1
  • 620608841435971601-@BenajaEphrath
    Like this?
    lucasg-1265300046350389349

    Lucas G

    1 year ago

    Don’t know if you covered it with Max but you’ll also need to set your default for owner (auth.uid)
    👍1