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

    zhukov

    04/28/2022, 8:17 AM
    Hey all! Is there a way to VerifyToken from supabase to independent microservices ? Like the Login, user management can stay in supabase itself, but when the JWT is passed to some other backend service (example python service), the python service can Verify the token and then send back the response ?
    n
    v
    m
    • 4
    • 51
  • m

    Muezz

    04/28/2022, 11:31 AM
    My database function runs but is not behaving the way I want it to. To figure out what is going on, I want to output some print-like statements to the console. I found out that
    raise notice
    will do what I am trying to do. But nothing appears in the console log. I also tried
    raise exception
    and that works but the problem with that is that the function stops because of that exception. I found this stackoverflow question where the anser for this is:
    Check the value for "client_min_messages" in your session - it should be "NOTICE" or later to see notices.
    I have gone through the settings and I cannot find any option to toggle this to
    notice
    .
    n
    g
    c
    • 4
    • 17
  • c

    cdro

    04/28/2022, 4:43 PM
    Hi everyone. I had a question about using filters on a json column from a joined table. Here is the query I am using
    Copy code
    const { data, error } = await supabase
          .from<definitions['event_verifier']>('event_verifier')
          .select('id,address, createdAt, verifiedAt, event:eventId (id, slug)', { count: 'exact' })
          .eq('event.slug', slug);
    What I am noticing is that records that don’t pass the
    eq
    are still returned, with that field set to null.
    Copy code
    {
        id: 'f5547b29-4820-4e95-ade5-df6dfbcc07f8',
        address: '0x9372Eb1DfF66859B9e8D05D6014F5d1d87d031c4',
        createdAt: '2022-04-23T19:56:01.486799+00:00',
        verifiedAt: null,
        event: null
      },
    I have to take an additional step here and filter through the result to make sure that an event object is there. Is there a way to omit the return result entirely if
    .eq('event.slug', slug)
    doesn’t pass?
    n
    s
    l
    • 4
    • 6
  • m

    Muezz

    04/28/2022, 8:53 PM
    I am getting this error from a database function:
    type of parameter 1 (record) does not match that when preparing the plan (db_transactions)
    For the code, context and details, check the thread. I would really appreciate any sort of help.
    n
    c
    t
    • 4
    • 14
  • m

    msy

    04/29/2022, 3:25 AM
    Hi, having troubles with using a trigger to create a user.profile entry when a user signs up. My sign up:
    Copy code
    const { user, session, error } = await supabase.auth.signUp(
          {
            email: email,
            password: password,
          },
          {
            data: {
              firstName,
              lastName,
              email,
              rating: 0,
              profilePicURL: "",
            },
          }
        );
    This adds to the auth table:
    n
    g
    • 3
    • 23
  • x

    xephyr

    04/29/2022, 3:38 AM
    I'm getting
    ERROR: must be member of role "supabase_admin"
    when trying to
    supabase db push
    to my production instance after having worked off a
    dev
    instance for the past day or so. Have been through the usual Google searches but all threads I've read are talking about the Supabase Studio SQL editor, not running commands locally. What do I have to do locally to be a member of the
    supabase_admin
    role?
    n
    g
    • 3
    • 10
  • m

    msy

    04/29/2022, 5:03 AM
    Copy code
    const { user: authUser } = await supabase.auth.api.getUserByCookie(req);
      // Check if the user is logged
      if (authUser === null) {
        // Redirect if no logged in
        return { props: {}, redirect: { destination: "/" } };
      }
      // If logged return the user
      let { user, error } = await supabase.from("users").select("id, first_name");
      console.log("user", authUser);
      if (user) {
        return { props: { user: user } };
      } else {
        return { props: {}, redirect: { destination: "/" } };
      }
    I read on the supabase documentation that with the set policies I wouldn't need to filter and I could directly do .from("users") and get the relevant row from the public users table, with the primary key set as a foreign key to the auth.users table Note: authUser is returning the correct value.
    n
    g
    • 3
    • 8
  • i

    improb

    04/29/2022, 7:35 AM
    I'm trying to save some auth settings and keep getting this failed to fetch error
    n
    • 2
    • 1
  • i

    improb

    04/29/2022, 7:36 AM
    I tried resetting the server but it didn't do anything any ideas?
    n
    • 2
    • 2
  • p

    pedrodiaz

    04/29/2022, 12:13 PM
    Is there a way to transfer a project ownership? Like giving it to another supabase account for example
    n
    o
    • 3
    • 7
  • n

    Needle

    04/29/2022, 12:13 PM
    Hello @pedrodiaz! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! 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
    • 2
  • t

    torkleyy

    04/29/2022, 1:49 PM
    I'm wondering, what's the preferred way to disable anonymous access to the database? I'm considering two options: 1. Revoke access to anon from authenticator. - This seems the most "global" solution, but will it cause any problems? 2. Revoke access to all my objects from anon - tedious and too easy to forget something What is the best practice to disable unauthenticated access?
    n
    o
    • 3
    • 6
  • s

    Studywithdesign

    04/29/2022, 2:23 PM
    I need to get count of the rows in the table
    supabase.from('posts').select('id, title, count(likes(auhtor_id)));
    n
    g
    • 3
    • 4
  • a

    AmusedGrape

    04/29/2022, 2:59 PM
    so uh, supabase is giving me an error saying it cant get the user email from the external provider (discord)? i have the email scope there so i have no idea what's going on
    n
    m
    +3
    • 6
    • 29
  • l

    limzee

    04/29/2022, 3:07 PM
    does the api only have access to the public schema?
    n
    g
    • 3
    • 4
  • y

    yxsh

    04/29/2022, 3:32 PM
    Error getting user email from external provider
    n
    a
    • 3
    • 7
  • d

    darlansbjr

    04/29/2022, 4:18 PM
    Hey guys, anyone having problems with phone sign in? We started getting a 502 error this morning
    n
    • 2
    • 2
  • s

    simply

    04/29/2022, 4:40 PM
    Hello, is there any doc that explains the procedure of self-hosted upgrade of supabase?
    n
    d
    • 3
    • 4
  • g

    Garett MacGowan

    04/30/2022, 12:00 AM
    Does an API endpoint exist such that I could programmatically add to the db_schema config of PostgREST? Trying to do this locally (for testing) as well as production. I've got supabase deployed in local docker for testing.
    n
    g
    s
    • 4
    • 28
  • s

    Scott Prins

    04/30/2022, 12:12 AM
    So say I have a public table users that is created on Auth user signup, and contains some data on user role, what is the best way to check role before logging in, since I have 2 separate clients, one flutter app for consumer users, and a Nextjs app for provider users and an admin user, and want to disallow users from trying to log into a client that isn’t for that user role? Should I just get the email at login form submit and query for user role before calling the auth.signInWithEmail?
    n
    • 2
    • 1
  • m

    Mateus Rossetto

    04/30/2022, 12:55 AM
    Good night, I'm implementing a mini app, where I want to store files in a public bucket, where I want to save and get a public url (getPublicUrl), so far so good! when I go to access the links of the files someone shows me the errors in the attachment, would you know what it could be?Good night, I'm implementing a mini app, where I want to store files in a public bucket, where I want to save and get a public url (getPublicUrl), so far so good! when I go to access the links of the files someone shows me the errors in the attachment, would you know what it could be?
    n
    n
    • 3
    • 3
  • n

    NARCISO

    04/30/2022, 12:57 AM
    Hi everyone, I am currently encountering issues with
    subscriptions
    . I'm using
    NextJS
    and I use a hook in 2 different pages to setup the subscription that is basically this (copied from the
    nextjs-slack-clone
    official example):
    Copy code
    ...
      useEffect(() => {
        const messageListener = sb
          .from<Message>("message")
          .on("INSERT", (payload) => setTempNewMessage(payload.new))
          .subscribe((event, e) => {
            console.warn(`[Message] Listener ${event}`, messageListener);
            if (e) {
              console.error("[Message] Listener error", e);
            }
          });
    
        console.error("STARTED LISTENING...", messageListener);
        // Cleanup on unmount
        return () => {
          messageListener
            .unsubscribe()
            .receive("ok", () => console.error("!SUBSCRIPTION REMOVED!"));
        };
      }, []);
    At the first page load, the subscription is all good and works perfectly. But when I do
    router.push
    to the other page, it unsubscribe correctly but the new subscription starts
    CLOSED
    and even the
    RETRYING_AFTER_TIMEOUT
    does nothing. Any ideas?
    n
    g
    • 3
    • 34
  • n

    Needle

    04/30/2022, 1:07 AM
    Hello @garyaustin! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! 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.
  • s

    Sasial

    04/30/2022, 9:33 AM
    How would I move a structure like this over to supabase?
    n
    g
    • 3
    • 17
  • t

    Tobbe

    04/30/2022, 9:55 AM
    Hi. I'm trying to delete a few rows in a table, but keep getting "Failed to fetch". What am I doing wrong? A basic SELECT works but DELETE doesn't
    n
    • 2
    • 4
  • l

    Lukas V

    04/30/2022, 10:16 AM
    Hello, what is the situation with the image compression in supabase? Currently in firebase I have an extension that on every upload creates compressed copy of the image to my specification. Is "Transformations" going to be the same, if yes, when it's going to be available and what do people do at the moment to compress their images?
    n
    g
    • 3
    • 3
  • n

    Needle

    04/30/2022, 11:43 AM
    Hello @Ludvig! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! 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.
  • s

    Shane

    04/30/2022, 5:04 PM
    Is it possible to use RDS? It specifically says that you can in the documentation but the pgjwt extension is required and not available in RDS.
    n
    g
    • 3
    • 3
  • p

    pocin

    04/30/2022, 7:24 PM
    When uploading files to storage while developing locally (
    $ supabase start
    ), where are the actual files stored? Is there some filesystem mock of the s3 api?
    n
    g
    • 3
    • 5
  • k

    Keeko

    04/30/2022, 11:37 PM
    Hello, About supabase auth. I'm reporting an incident when updating to a new email. please see the scenario below. - Me as a user. Created a new account with Google provider (me@gmail.com) - success! - Later... I've decided to change my email to a regular email (me@anyemail.com) - success! - No problem, It's working. I can login with my new regular email (me@anyemail.com) - However, when I tried to login through Google with my previous email (me@gmail.com) it's still working! I still can be authenticated with it on behalf of the new regular email. In reality, this previous Gmail shouldn't be able to login. - Any suggestions on how to solve this? The documentation says only for a regular update email scenario.
    n
    g
    • 3
    • 4
1...264265266...316Latest