https://supabase.com/ logo
Join Discord
Powered by
# help
  • e

    enyo

    06/23/2022, 2:27 PM
    Hi! I created a
    profiles
    table that is public and contains user profile information. I also have a
    invitations
    table with
    user_id
    that references
    auth.users.id
    . No I tried to make a query and collect the profile info of the user alongside like this:
    Copy code
    ts
    await supabase
          .from('invitations')
          .select('*, profiles(name)')
          .eq('id', invitationId)
          .single()
    But it fails, because
    Could not find a relationship between 'invitations' and 'profiles' in the schema cache
    (which is understandable). Is there a way to tell supabase that I want to link the
    user_id
    to the
    profiles_id
    ?
    n
    g
    • 3
    • 7
  • 🆕 blackpery123 (2022-06-23)
    n

    Needle

    06/23/2022, 2:28 PM
    Hello @sergiofra98! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
  • u

    1337

    06/23/2022, 3:37 PM
    Anyone could elaborate how to query relational data from different schemas?
    public.posts
    rows has
    image
    column which is foreign key of
    storage.objects.id
    . As soon as I trying to query it via rest as
    posts?select=image(*)
    it throws me error:
    Copy code
    js
    {
        "message": "Could not find a relationship between 'posts' and 'image' in the schema cache",
        "code": "PGRST200",
        "details": null,
        "hint": "Verify that 'posts' and 'image' exist in the schema 'public' and that there is a foreign key relationship between them. If a new relationship was created, try reloading the schema cache."
    }
    Meanwhile
    posts?select=image
    returns UUIID from
    storage.objects.id
    What do I missing?
    n
    g
    • 3
    • 5
  • s

    snoodleking

    06/23/2022, 3:52 PM
    hey folks, ran into this when trying to transfer ownership of a team:
    n
    s
    • 3
    • 2
  • a

    Audrow

    06/23/2022, 4:21 PM
    I'm having trouble connecting to my database with psql. I'm on a Mac with Monterey. I've downloaded postgresql 14 with hombrew. I'm using the psql connection command in Settings > Database in my system terminal. When prompted for a password (or using the
    -W
    flag to force the prompt), I'm entering the database password. I've tried resetting the password and using the new password several times. I keep getting this error:
    Copy code
    psql: error: connection to server at "db.vcbvykgybqflwpgslxio.supabase.co" (3.91.76.113), port 5432 failed: Connection refused
    Any thoughts on what I'm doing wrong?
    n
    o
    +3
    • 6
    • 32
  • m

    maz

    06/23/2022, 5:37 PM
    hi does anyone know about this error? i can't seem to upload images using the api on production (using nextjs), but works fine on dev
    n
    g
    • 3
    • 6
  • h

    honkstyle

    06/24/2022, 12:01 AM
    I'm curious what people's thoughts/experience with querying the db from the frontend, or building a backend and connecting that way. Any immediate pros and cons besides maintaining a backend vs not? If you did frontend, how did you handle emails, stripe subs/payments, etc?
    n
    s
    g
    • 4
    • 11
  • i

    imousart

    06/24/2022, 3:07 AM
    hi guys .. so i have table contains stores and table contains categories . how can i linked stores with multiple categories ? i tried to make fkeys but failed
    n
    g
    • 3
    • 4
  • w

    WishSolidor

    06/24/2022, 3:32 AM
    Hi, how can I make a column mandatory based on the value of another column on the same table?
    n
    g
    • 3
    • 3
  • h

    Hyz

    06/24/2022, 5:14 AM
    Hi, do you know if I can execute Supabase sql through command line if I have it selfhosted?
    n
    h
    • 3
    • 4
  • w

    williamli

    06/24/2022, 7:46 AM
    Is there something strange going on at Supabase? Realtime events and auth emails stopped working for me without any code change. Resetting passwords from Supabase admin panel doesn't trigger any emails.
    n
    o
    • 3
    • 5
  • d

    Darwis

    06/24/2022, 8:27 AM
    Hii supabase fan, I want to ask about social authentication, basically, can we access the Linkedin OAuth callback and add some logic to save the users' email to my DB?
    n
    • 2
    • 2
  • j

    Jan Tennert

    06/24/2022, 11:00 AM
    Can a refresh token only get revoked when you log out or is there another way?
    n
    g
    • 3
    • 4
  • j

    Jupiter

    06/24/2022, 11:24 AM
    hey guys, anyone knows why when auth email signups are disabled, supabase auth still requires email confirmation? tried to restartd the DB and now it's stuck there
    n
    • 2
    • 5
  • s

    Shoki

    06/24/2022, 12:32 PM
    hello, i want to upload an image to a newly created bucket in react native bit i'm getting this error:
    Copy code
    js
    error Object {
      "error": "",
      "message": "new row violates row-level security policy for table \"objects\"",
      "statusCode": "42501",
    }
    what should i do ?
    n
    g
    • 3
    • 15
  • m

    maciekChmura

    06/24/2022, 12:55 PM
    Hello, I have a strange problem with auth with magic links. I've just published my app and can't signin. When I receive an email with magic link I still get
    &redirect_to=http://localhost:3000
    My setup in supabase looks like this:
    n
    g
    m
    • 4
    • 15
  • g

    giorgio

    06/24/2022, 3:02 PM
    Hello, is there a way to add a policy that restricts access to the collection but that allows access to a single item?
    n
    g
    • 3
    • 17
  • s

    Shoki

    06/24/2022, 3:30 PM
    hello when selecting elements from storage.object table like that:
    Copy code
    js
      const { data, error: dbError } = await supabase
          .from("storage.objects")
          .select();
    i'm getting this error:
    "relation \"public.storage.objects\" does not exist"
    , do i need to had polices to access this table ?
    n
    g
    • 3
    • 5
  • 1337 (2022-06-24)
    n

    Needle

    06/24/2022, 4:59 PM
    Hello @1337! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
    • 1
    • 1
  • m

    maz

    06/24/2022, 5:22 PM
    has anyone gotten this error before? (ignore the first 5 lines and the last line) any help is greatly appreciated!!
    n
    g
    • 3
    • 12
  • s

    sb

    06/24/2022, 5:29 PM
    Anyone else having issues connecting to their db rn?
    n
    g
    b
    • 4
    • 4
  • k

    Keonwoo Kim

    06/25/2022, 3:02 AM
    Hello, I'm getting an
    Unsupported Provider
    error while I have enabled an OAuth login (Twitter). I have found a related discussion on GitHub (https://github.com/supabase/supabase/discussions/7402) while it says it was a server location issue. I recreated an app inside the US and again it did not work. Not only for Twitter; for Discord the same error occurred. I have set up the site URL and client configs properly (probably).
    n
    • 2
    • 1
  • b

    battlesheep123

    06/25/2022, 8:35 AM
    I'm currently using a Frontend Framework such as Sveltekit to read data during server-side rendering from Supabase. Is it a good practice to do that directly in the frontend? Or would you rather call an API and within your API you do all the Supabase access?
    n
    • 2
    • 1
  • j

    James Q Quick

    06/25/2022, 2:07 PM
    I'm trying to run one query to update records that already exist and add records that don't already exist. For example, if I have 5 records, 3 of which already are records in the db and have an
    id
    property, and 2 that are not yet records in the db. I thought I would use
    upsert()
    for this, but it seems like
    upsert()
    requires primary keys to already be attached to all records. Is that correct? Does that mean I need to make 2 different queries?
    n
    g
    • 3
    • 3
  • l

    llcooliovanillaicet

    06/25/2022, 2:10 PM
    I am going through a tutorial for setting up Supabase with Deno. https://deno.com/deploy/docs/tutorial-postgres I am getting the error:
    Copy code
    TLS connection failed with message: invalid peer certificate contents: invalid peer certificate: UnsupportedCertVersion
    Defaulting to non-encrypted connection
    PostgresError: SASL authentication failed
    What is likely causing this error? How can I fix it? My code is:
    Copy code
    import { serve } from "https://deno.land/std@0.142.0/http/server.ts";
    import * as postgres from "https://deno.land/x/postgres@v0.14.0/mod.ts";
    
    const databaseUrl = Deno.env.get("DATABASE_URL")!;
    const pool = new postgres.Pool(databaseUrl, 3, true);
    
    const connection = await pool.connect();
    try {
        await connection.queryObject`
        CREATE TABLE IF NOT EXISTS todos (
            id SERIAL PRIMARY KEY,
            title TEXT NOT NULL
        ) 
        `;
    } finally {
        connection.release();
    }
    n
    o
    • 3
    • 2
  • c

    chano08

    06/25/2022, 2:52 PM
    hello, can anyone help me on this error? thank you.. it says provider is not enabled wherein i've already enable them
    n
    b
    +4
    • 7
    • 100
  • u

    [ᴛʜᴇ ᴇᴍᴘᴇʀᴏʀ]

    06/25/2022, 4:49 PM
    So I have a bucket with an image named
    css.svg
    I wanted to change that image to something else so i uploaded a new image on the bucket, which was named
    css (1).svg
    when i uploaded it. I deleted the old file and renamed
    css (1).svg
    to
    css.svg
    when i open it in a new tab, i found out that the old image is still served instead of the new one How can i fix this
    n
    g
    • 3
    • 8
  • b

    BumontheRun

    06/25/2022, 6:04 PM
    I'm using
    @supabase/auth-helpers-sveltekit
    and can't seem to get RLS to work on API endpoints. I have code like this:
    Copy code
    export const get: RequestHandler = ({ locals, request }) => {
      return withApiAuth({ user: locals.user }, async () => {
        const response = await supabaseServerClient(request)
          .from<List>('lists')
          .select('*, items(*)')
          .eq('user_id', locals.user.id);
        return response.data;
      });
    };
    I've confirmed
    locals.user
    is present, and the access token is in the request cookies. However
    supabaseServerClient(request).auth.user()
    comes back null and my response data doesn't include the items. It seems to work fine client side. Is there something I'm missing? My hooks handler looks exactly like the guide.
    n
    g
    s
    • 4
    • 12
  • c

    ChrisPBacon

    06/25/2022, 6:27 PM
    Hi, In the API under User Management, it says I use the following to log a user in:
    Copy code
    let { user, error } = await supabase.auth.signIn({
      email: 'someone@email.com',
      password: 'YyadRWzWwhPBuARgumFw'
    })
    And then in the auth-deep-dive doc it references the
    user access token
    and refers to getting that when user signs in. However, simply using
    user
    and
    error
    won't produce any token. Only until I also include
    session
    do I get information that looks like the JWT token. Is this in fact the JWT that the deep-dive refers to? If so, I assume it was automatically signed with my secret JWT token? I'm looking at ways to implement user authorizations so I'm trying to wrap my head around the process
    n
    g
    • 3
    • 4
  • t

    tjpoo

    06/25/2022, 7:36 PM
    I'm having some issues with my auth settings actually taking effect. I disabled email confirmations, since I want to use some fake emails. However, when I sign up, I'm still getting a "waiting for authorization" in the user list. Go back into my auth settings and email confirmations is still disabled. Not sure what else to do or look for.
    n
    g
    • 3
    • 49
1...290291292...316Latest