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

    Lukas V

    08/05/2022, 5:18 PM
    Hello, I am currently using one of supabase templates - https://github.com/vercel/nextjs-subscription-payments I want to subscribed users to have access to "premium" features, I thought that I could use custom claims, but as I was reading this here - https://github.com/supabase-community/supabase-custom-claims
    Copy code
    One drawback is that claims don't get updated automatically, so if you assign a user a new custom claim, they may need to log out and log back in to have the new claim available to them.
    I started thinking if thats even good solution for subscriptions? Is it better to simply have a read only, table with current user subscription status and just check for status every time user makes a call to use one of the "premium" features?
    n
    v
    g
    • 4
    • 5
  • c

    caesarp

    08/05/2022, 5:23 PM
    Hello, quick quesiton.. having the the anon key in a frontweb app, will allow clever people to submit in our app 'auth' users and being able to see protected tables under 'authenticated' role lock.. what's the best way to disallow people grabbing the key from being able to register (signon) with any pre-configure provider? is there a 'OnSignon' event (maybe edge function trigger) that will let you do a 'pre-validation' and decline a signin call before letting them create an account in the users database?
    n
    v
    g
    • 4
    • 5
  • j

    Jaaneek

    08/05/2022, 5:40 PM
    Hi, can I somehow add storage files from supabase to next.config.js? I want to use from next.js and prefetch all of the images but I'm not quire sure if that is the right way to do it
    n
    • 2
    • 2
  • k

    knajjars

    08/05/2022, 5:54 PM
    Hi all! wondering if there is a public roadmap for Supabase?
    n
    • 2
    • 1
  • a

    andreibv96

    08/05/2022, 6:34 PM
    Hi guys. It's really the first time I tried using edge functions and all good so far. But I have a problem tho. I am trying to use
    import { createClient } from "https://deno.land/x/supabase@1.3.1/mod.ts"
    so I can use the supabaseClient basic functions such as insert.
    const supabaseClient = createClient(dbUrl, publicAnonKey, { schema: 'public' });
    should do the initialization, but I think something is wrong there, or maybe I am missing something. The error states the following:
    Copy code
    {
      error: {
        message: "FetchError: scheme 'postgres' not supported",
        details: "",
        hint: "",
        code: ""
      },
      data: null,
      body: null,
      count: null,
      status: 400,
      statusText: "Bad Request"
    }
    . Has anyone experienced that before? Thank you!!
    n
    s
    • 3
    • 8
  • c

    cryptosi

    08/05/2022, 6:51 PM
    I have tables:
    Copy code
    users:
    
    id
    username
    Copy code
    user_owner_user:
    
    id
    user_id -> ref users.id
    owner_user_id  -> ref users.id
    I want to create a query like so:
    Copy code
    db.from('users')
      .select(`
        *,
        ownerUser!user_owner_user(*)
      `);
    Getting the following error:
    Copy code
    Try changing 'users' to one of the following: 'users!user_owner_user', 'users!user_owner_user'. Find the desired relationship in the 'details' key."
    n
    g
    • 3
    • 29
  • a

    Alan Coppin

    08/05/2022, 9:47 PM
    Hey team, when using magic link. Is the cookie domain supposed to be the Supabase domain or the domain your app is on. I.e: If I signIn from localhost:3000, should the cookie domain be set as localhost:3000 instead? Just wondering as my magic link worked fine a few days back and the suddenly stopped working without any changes made to it
    n
    s
    • 3
    • 2
  • u

    49Ryann

    08/06/2022, 4:41 AM
    Is there any support for enum's in Supabase?
    n
    v
    • 3
    • 3
  • s

    STILLWATER;

    08/06/2022, 8:42 AM
    Is there a way to make a dynamic get api which takes array of column names and select and return them, maybe using supabase js or maybe rpc?
    n
    s
    • 3
    • 4
  • r

    rankala

    08/06/2022, 10:06 AM
    Hi, i wanted to try supabase in the cloud. In my test, i register a user with the sdk, but don't recive a verification email. My understanding is, i can send 30 mails per hour in the free tier. But this would be the first on of the day. For testing/dev, i dont need a verification, so is there an option manualy approve the mail?
    n
    • 2
    • 1
  • h

    Hal

    08/06/2022, 11:17 AM
    Hi, I can't receive my magic link email today. I checked the pricing page and find there is a limit for sending emails. Only 30 emails per hour. Doesn't this mean I ran out of my quota? How can I know the number of emails sent in the dashboard?
    n
    s
    • 3
    • 4
  • k

    KickNext

    08/06/2022, 11:23 AM
    Hello, emails take a very long time to send, what could be the problem?
    n
    s
    • 3
    • 3
  • l

    Lukas V

    08/06/2022, 12:20 PM
    Hello, I am storing users info such as name, nickname, email, height, weight, profile photo etc. I want to implement a full text search functionality and obviously I want sensitive data
    email, height, weight
    to only be accessed by the user alone. In this situation should I create a separate table
    users-public
    where I only store
    name, nickname, profile photo
    and allow public read access, or is there some form of column level security where I only have one users table, but "lock" columns that contain sensitive data, if thats even possible?
    n
    s
    +2
    • 5
    • 5
  • c

    caesarp

    08/06/2022, 2:32 PM
    hello, is there any plan to do a 'hosting' part (equivalent to firebase) to do hosting of html,css,js (for the frontend part of teh application) in supabase? can that be implemented onlly with 'storage' in public mode?
    n
    g
    • 3
    • 2
  • u

    49Ryann

    08/06/2022, 2:39 PM
    I've noticed "auth.email(), auth.uid() and auth.role()" Helper functions are accessible in policies, but is the entire auth.user? more specifically the auth user metadata?
    n
    n
    s
    • 4
    • 27
  • m

    MrPalixir

    08/06/2022, 4:51 PM
    Hello, It's possible to use the supabase studio for self hosting in production ? Because when I launch with "supabase start" It's written it's only for development setup.
    n
    • 2
    • 1
  • k

    Kiteflow

    08/06/2022, 8:13 PM
    Hi, just wondering if there's a way to get the row count of a query, but not the actual data?
    n
    g
    • 3
    • 4
  • r

    rankala

    08/06/2022, 8:54 PM
    hi, i deployed superbase on my server with traefik. I have the studio running on
    studio.my-domain.tld
    and kong on
    supabase.my-domain.tld
    . As a result, my brwoser blocks the api request with mixed content. Do you have an idea, how i can solve this?
    n
    • 2
    • 1
  • a

    Ape R Us

    08/06/2022, 9:46 PM
    hey, is there anything that can generate a 5 digit confirmation code (similiar to uuid) for a ticketing website in supabase?
    n
    g
    p
    • 4
    • 7
  • d

    Domcario

    08/06/2022, 11:56 PM
    what would be the best way to get a public url for all assets in a public bucket? im wondering after looking at this https://supabase.com/docs/reference/javascript/storage-from-getpublicurl
    n
    g
    • 3
    • 2
  • u

    49Ryann

    08/07/2022, 1:33 AM
    Does anyone know how far off the generated types are on the Supabase roadmap? "Supabase will soon release native type generators that dump your database types for various languages"
    n
    o
    s
    • 4
    • 4
  • d

    debabrata

    08/07/2022, 4:56 AM
    Is there guide to migrating to a new Supabase instance? I have a project that I created around a year ago and it doesn't have access to cloud functions. I would like to move everything to a new project (tables, auth data, etc)
    n
    • 2
    • 1
  • c

    cryptosi

    08/07/2022, 8:22 PM
    Hi, I'm trying to filter by multiple categories across multiple columns. This is the query but its not working, any ideas:
    Copy code
    ts
    const q = db.from('items')
      .select(`
        *,
        product:product_id!inner(
          *,
          primaryCategory:primary_category_id!inner(*),
          category:category_id!inner(*),
          subCategory:sub_category_id!inner(*)
        )
      `);
    
    const vals = ['cups', 'food', 'clothes'].join(',');
    q.or(`
      product.primaryCategory.slug.in.(${vals}),
      product.category.slug.in.(${vals}),
      product.subCategory.slug.in.(${vals})
    `);
    n
    g
    • 3
    • 18
  • r

    React noob

    08/07/2022, 9:06 PM
    Copy code
    failed to update pg.columns with the given ID: cannot cast type bigint to uuid
    you can't change the type of the id after create the table ?
    n
    o
    • 3
    • 2
  • g

    getpost

    08/08/2022, 11:49 AM
    hey, I'm looking for some RLS help
    n
    g
    g
    • 4
    • 13
  • u

    user

    08/08/2022, 1:33 PM
    Hey everyone, I'm doing email auth and I want to redirect to different pages based on the result of the email confirmation. So a your email has been verified page if you're verified or an invalid email link if it doesn't work. How should I go about this?
    n
    k
    i
    • 3
    • 5
  • k

    Kellen Mace

    08/08/2022, 1:47 PM
    Hello, all! I'm trying to copy my Supabase DB from one project to another project to create a staging environment. When I run the
    psql -h $NEW_DB_URL -U postgres -f dump.sql
    command here (https://supabase.com/docs/guides/database#migrate-the-database) though, I get :
    Copy code
    psql: error: connection to server at "krpyriciwjyezbzvkmjo.supabase.co" (104.18.27.135), port 5432 failed: Operation timed out
        Is the server running on that host and accepting TCP/IP connections?
    connection to server at "krpyriciwjyezbzvkmjo.supabase.co" (104.18.26.135), port 5432 failed: Operation timed out
        Is the server running on that host and accepting TCP/IP connections?
    Does anybody know what I can do to correct that?
    n
    • 2
    • 3
  • e

    enti

    08/08/2022, 2:02 PM
    I'm trying to add data to the user at signup(). The doc provides this example:
    Copy code
    const { user, session, error } = await supabase.auth.signUp(
      {
        email: 'example@email.com',
        password: 'example-password',
      },
      {
        data: { 
          first_name: 'John', 
          age: 27,
        }
      }
    )
    But do I need to create something on auth.users? The only columns there right now are 'Email', 'Phone', 'Provider', 'Created', 'Last Sign In' and 'User UID'. No metadata column or something. Or is it better practice to create a
    userdetails
    table separately?
    n
    k
    d
    • 4
    • 17
  • r

    React noob

    08/08/2022, 5:53 PM
    Copy code
    ts
         const {user,error} = await supabase.auth.signIn({
                email: _data.email
            })
            if(user){
                await supabase.from('profiles').insert([{id:user.id, username:'John Doe'}])
            }
        }
    I'm trying to create a user with Magic Link and create the table but nothing happen
    n
    • 2
    • 1
  • o

    omar

    08/08/2022, 5:59 PM
    Why are functions so hard to debug? The error messages are useless and have no clues why the function failed. Soooo frustrating 😩
    n
    s
    • 3
    • 10
1...312313314315316Latest