https://supabase.com/ logo
Join Discord
Powered by
# help-and-questions
  • Use Edge functions on self hosted
    f

    florian

    08/19/2022, 9:54 AM
    How to do that? I am missing the option in my self hosted environment and i just pulled the latest version
    h
    s
    t
    • 4
    • 3
  • Insert into table, ignore columns that don't exist
    d

    Deleted User

    08/19/2022, 1:22 PM
    Hello! I'm just wondering how to ignore if a column doesn't exist? So that I can insert data to the database from json, and if there are any KEYS that don't match the table, they will just be ignored?
    g
    • 2
    • 19
  • What's the cost of edge functions if I exceed limit of 2M Invocations?
    t

    theuknowner

    08/19/2022, 1:25 PM
    I want to use Supabase Pro package, what's the cost for more Edge Functions Invocations?
  • Deleted the auth.users table
    f

    FloH

    08/19/2022, 1:58 PM
    Hey guys, as mentioned in the title: I have delted the auth.users table -> what shall i do now? br Flo
    g
    • 2
    • 5
  • Delete Subscribe, old only returns ID
    d

    Deleted User

    08/19/2022, 2:01 PM
    When you subscribe to events to the database. When you delete a record you only get the id from what was deleted. Is there anyway to get the data row fully, (for instance name, etc) returned also?
    g
    • 2
    • 7
  • google auth on nextjs
    h

    harshcut

    08/19/2022, 2:13 PM
    i am using
    next/router
    to push to
    /u/dashboard
    if there is no error on creating user with google auth. the problem is the redirect reverts back to
    localhost:3000/#
    on success. after then a full reload get me to
    /u/dashboard
    .
    Copy code
    ts
    // /index.tsx (login page)
    const withAuthProvider = async () => {
      const { error } = await supabase.auth.signIn({ provider: 'google' })
      if (error) return setToast({ text: error.message, type: 'error' })
      router.push('/u/dashboard')
    }
    
    export const getServerSideProps: GetServerSideProps = async (context) => {
      const { user } = await getUser(context)
      if (user) return { props: {}, redirect: { destination: '/u/dashboard', permanent: false } }
      return { props: {} }
    }
    Copy code
    ts
    // /u/dashboard.tsx (protected page)
    export const getServerSideProps: GetServerSideProps = withPageAuth({
      redirectTo: '/',
      async getServerSideProps(context) {
        const { user } = await getUser(context)
        return { props: { user } }
      },
    })
    p
    • 2
    • 2
  • supabase + directus in a 2gb ram 2 core vps -- good or bad?
    t

    Thoth Trismegistus

    08/19/2022, 6:26 PM
    I have a 2gb ram 2vcpu vps. can i run supabase + directus in the server for my mobile app. I also have a small website with low visitor count. But mobile app is the main client. Is this a good idea or should i just use supabase?
  • does supabase support graphql subscription?
    t

    Thoth Trismegistus

    08/19/2022, 6:46 PM
    does supabase support graphql subscription?
  • Get anon-key in SQL
    m

    MrGandalfAndhi

    08/19/2022, 7:34 PM
    Hey, I was wondering how I can query the public key in an SQL-query in the SQL-Editor. I need it for a cron-job, and I don't want to hardcode it in case we have to reset the keys. Cheers
    g
    • 2
    • 2
  • Postgres query count characters and order by longest length
    c

    candidosales

    08/19/2022, 11:02 PM
    How can I do this query in Supabase JS SDK?
    Copy code
    select title from stories order by length(title) desc
  • Create function for RLS that cannot be called by users
    u

    uneatenauthor

    08/20/2022, 12:42 AM
    I've created some utility functions that I use in my RLS and they seem to work but some of them could be abused by users to learn about other users. How do I ensure that an authenticated user cannot just call one of these functions on their own? I basically want to restrict the functions to only being called by the backend itself to check the details of a user.
    g
    • 2
    • 7
  • user_metadata is empty when when connecting OAuth with same email
    t

    The Aleks

    08/20/2022, 1:35 AM
    So, I'm trying to connect discord users with our email based users in our own backend. In our case, we need to support both the case where the email is and isn't the same. But, whenever I login with a user and subsequently login with a discord user with the same email user_metadata fails to update. This means I won't have them in the access_token and therefore won't be able to pass the data to our backend in a trusted manner. I've checked that the identity is saved properly in the identities table, so the data isn't missing. When I login again with discord, the data is synced correctly. Any idea what might be the course of this?
  • How do I make sure that realtime gets enabled by default on local dev instances?
    u

    uneatenauthor

    08/20/2022, 1:52 AM
    I develop locally using the supabase cli + docker before pushing to production on supabase. I noticed that when I issue supabase stop/start command (which destroys and redeploys docker), realtime gets disabled on all the tables. Enabling it and running a db diff shows no changes. Where is this setting stored and how do I make it persistent so that other devs on my team can just
    supabase start
    and expect the app to work?
  • Magic link email not sent for local Supabase
    z

    Zapuzu

    08/20/2022, 3:47 AM
    Hi there! I'm not receiving an email for a magic link sign in for my local setup. I check in local supabase studio and see that a user is created, but I don't see any email (checked junk inbox too). If I change the value of the essential environment variables from local to production values, then it works. What could be wrong?
    n
    • 2
    • 5
  • psql connection times outI
    p

    Peanut

    08/20/2022, 4:39 AM
    I'm trying to connect to my db via psql on Windows and every combo of connection details fails:
    Copy code
    psql -h db.[myid].supabase.co -p 5432 -d postgres -U postgres
    Copy code
    psql: error: connection to server at "db.[myid].supabase.co" ([ip]), port 5432 failed: Connection timed out (0x0000274C/10060)
            Is the server running on that host and accepting TCP/IP connections?
    When I use DBeaver to connect it works. When I use the REST API via a web app it works. Why is the psql command not working?
    d
    o
    • 3
    • 3
  • Migra vs PGAdmin
    n

    nahtnam

    08/20/2022, 6:48 AM
    Is it better to use migra or no? I noticed it in the video but since its not the default flag I'm no
    b
    • 2
    • 1
  • Realtime event callback does not fire, but events are received in websocket messages
    a

    adarsh1021

    08/20/2022, 7:50 AM
    Hello! I have a very simple NextJS + Supabase setup, and I want to use the realtime feature to watch changes to a table. Here is what I have:
    Copy code
    useEffect(() => {
    
        const mySubscription = supabaseClient
            .from("item")
            .on("*", (payload) => {
              console.log(payload);
            })
            .subscribe();
        }
    
        return () => mySubscription.unsubscribe();
    
    }, []);
    The issue is that the callback does not fire - there is nothing on the console. But I can see every event received when I check the websocket messages through my inspect tools. I am pretty new to Supabase, was trying to get something working for the #870812914603413514 . I feel like this is something very small I am missing, any help would be greatly appreciated! Thanks πŸ™‚
    p
    g
    • 3
    • 20
  • Get provider access & refresh token on API side with next.js auth helper
    e

    Equinox

    08/20/2022, 10:02 AM
    Hello, I'm trying to get access to the Twitch provider tokens when using the Next.js auth helpers My goal would be to use the token server-side in my API to do some requests, however I can't seem to locate them anywhere in the
    auth.users
    table or anything apparently they're supposed to be stored in the session cookie but whenever I check for
    supabase.auth.session()
    or the
    ctx.req.cookies
    (in SSR) or
    req.cookies
    I can't seem to find the
    sb-provider-token
    indicated in the docs of the auth helper The only tokens stored in the cookies are
    sb-access-token
    and
    sb-refresh-token
    • 1
    • 1
  • Allow user to sign in, but still require email confirmation
    m

    maxim

    08/20/2022, 10:15 AM
    Is it possible to have users to sign up, go through an onboarding flow authenticated and update their own data, but then still require them to confirm their email to gain full access (or whatever access is defined in policies) later? As I understand, right now you either have to 1. enable email confirmation and user can't authenticate until email is confirmed, so onboarding blocked for the moment OR 2. disable email confirmation, and, well, it's disabled then and open for spam accounts
    g
    • 2
    • 1
  • The IP of the Supabase instance is static or dynamic?
    t

    theuknowner

    08/20/2022, 1:35 PM
    I want to integrate Google Cloud Functions to my Supabase project. In order to make it more secure I want to allow only http requests from my instance's IP. Is the instance's IP static or dynamic?
  • subscribe delay
    g

    Giton

    08/20/2022, 2:34 PM
    Hi! Is there any delay when i'm trying to subscribe to the INSERT event? Sometimes it happens instantly but sometimes I have to wait like 3-4-5 sec Thank you in advance!
    g
    t
    • 3
    • 5
  • PRISMA URL ERROR
    s

    samuele

    08/20/2022, 2:48 PM
    hi guys i'm having a problem with connecting to my db with prisma, when i do the migration command or push the db it gives me the error of bad connection... i copied the exact url gived by supabase and changed again the password as well
    n
    • 2
    • 17
  • Checking role in edge function
    g

    gorbypark

    08/20/2022, 3:01 PM
    Is there a way I check that the authentication token is a service_role key in an edge function?
  • Allow database row to associate to a specific storage file
    m

    MΓ‘rio Rodrigues

    08/20/2022, 3:03 PM
    Is it possible to associate a database row to a specific storage file. Example: Database - Products Storage - Product_Files Database Row1 - needs to have the 1st image uploaded Databasse Row2 - needs to have the 2nd image uploaded ... etc
    g
    • 2
    • 1
  • Auth Email Rate Limit
    r

    RyanR

    08/20/2022, 4:21 PM
    Hi, on the pricing page, it states an auth limit of 30 or 100 emails per hour for the free/pro plan respectively. If a service is launched on one of these, and it gets popular on something like reddit or hacker news, what happens when a burst of new users tries to sign up? What is needed to ensure a supabase instance does not become unavailable during a spike like that? Thanks!
    g
    c
    • 3
    • 5
  • Safety
    g

    Giton

    08/20/2022, 5:41 PM
    I have a webapp where a user can take notes and there's authentication. I'm still in learning phase! So what is the safest option to handle event's like INSERT or DELETE. I assume I have to subscribe on server side and then using for example: Socket.io to handle this between client and server ? Is there any better practice? Thank you in advance!
    o
    • 2
    • 8
  • How do I create a new Organization?
    n

    nickreed

    08/20/2022, 6:54 PM
    I only have a personal org created by default, and I'm trying to sign up for my company.
    g
    • 2
    • 2
  • refreashing url params
    e

    e.sh

    08/20/2022, 7:27 PM
    #1006358244786196510 test
    g
    • 2
    • 7
  • Fetching data that contains a FK relation not working
    c

    cryptosi

    08/20/2022, 7:28 PM
    When I attempt to fetch data that contains a relation for categories, I get the following error (this error happens with all tables that have relations):
    Copy code
    Could not find a relationship between 'categories' and 'categories_parent_id_foreign' in the schema cache
    g
    • 2
    • 55
  • Clientside password reset
    g

    gilroy

    08/20/2022, 7:57 PM
    Evening! I was wondering if anyone knows how I can manage clientside password resets (with react-router HashRouter). It seems the only way to request a password reset is via
    supabase.auth.api.resetPasswordForEmail
    which I'm assuming (since it's an api method) should only be called on a server. This discussion kind of confirms this https://github.com/supabase/supabase/pull/7443#discussion_r907523385 I have played around with using it on the client but the
    redirectsTo
    wont honour a hashed url (
    http://localhost/#/password-reset
    ). It just redirects to the route of my app. It works fine if I take the
    #
    out. I've read a little about listening for the
    PASSWORD_RESET
    event in
    supabase.auth.onAuthStateChange
    and then redirecting, but I've not managed to get that working yet. Surely this isn't the official solution? Any pointers would be great...
    g
    • 2
    • 6
1...567...230Latest