Help forum

Supabase Users ID

  • BenajaEphrath

    2 years 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

    2 years 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
  • unicodes

    2 years 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.
  • Lucas G

    2 years ago

    Your id column can’t be null (or duplicate) since it is the primary key
  • Lucas G

    2 years ago

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

    2 years ago

    Like this?
    1265204251932753950-image.png
  • BenajaEphrath

    2 years ago

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

    2 years ago

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

    2 years 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

    2 years ago

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

    2 years ago

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

    2 years ago

    @Max
    1265213014576201739-image.png
  • BenajaEphrath

    2 years ago

    Sorry, as i understand i have to login within the toddle editor, but same problem
  • @BenajaEphrath
    @Max

    Max

    2 years ago

    Can you hop on a short call?
  • BenajaEphrath

    2 years ago

    Sure
  • @BenajaEphrath
    Sure

    Max

    2 years ago

    I'll DM
    👌1
  • BenajaEphrath

    2 years ago

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

    Lucas G

    2 years ago

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