https://supabase.com/ logo
Join Discord
Powered by
# help-and-questions
  • OAuth for Apple on iOS (cannot open the page because the address is invalid.)
    t

    tincan

    03/13/2023, 10:29 PM
    I am trying to set up sign in with apple for my Swift project. The account is being created on Supabase side but I can not see the email associated with the account. trying to figure out what is the problem here and I am quite stumped. I think I could be that the NotificationCenter.default.post Isn't posting and there for the observer isn't working either
    l
    • 2
    • 5
  • how do I debug postgrest returning zero results on a query?
    o

    ostoto

    03/13/2023, 11:00 PM
    the same query works locally. context: - this is a basic select * on a view - all views have security=invoker - tables have RLS policies on them.
    g
    • 2
    • 1
  • how to find supabaseUrl and supabaseKey?
    k

    KremBanan

    03/13/2023, 11:18 PM
    I lost them after creating the db. Since these are not private (they can be bundled with client) why cant I find them in my supabase dashboard?
    g
    • 2
    • 4
  • Where Does Supabase Host
    v

    Vengeance

    03/13/2023, 11:52 PM
    Just curious, does Supabase, non self-hosting, host on AWS?
    g
    a
    g
    • 4
    • 4
  • Setting up storage buckets via SQL in local environment
    j

    jarnold

    03/14/2023, 12:07 AM
    I'm developing locally and have many buckets. Is there a way to set up these buckets via SQL in migration scripts? nbd if not as I can create a JS script to do it
    g
    • 2
    • 2
  • Signing in on the server?
    d

    DYELbrah

    03/14/2023, 12:50 AM
    Our team wants to write tests to verify RLS has been setup correctly. We want to login on the server as different users and attempt to query certain tables. How should we be logging in on our Jest tests to test? It appears that we can login using:
    Copy code
    const { error } = await supabaseBrowserTestClient.auth.signInWithPassword({
          email: adminEmail,
          password: adminPassword,
        });
    
        if (error) {
          throw error;
        }
    When we check for a session afterwards though we always get null? We need the session to persist throughout the lifetime of the jest tests. Any ideas? Thanks! Here is how I'm defining the supabase client: export const supabaseBrowserTestClient = createClient( "http://localhost:54321", "MY LOCALDB KEY IS HERE....", { auth: { persistSession: true, }, } );
    g
    • 2
    • 13
  • Possible to update column on monlthy basis?
    c

    Cabtn

    03/14/2023, 3:02 AM
    Hey all, I have a monthly subscription for users, they will have a certain number of credits a month based on their subscription. Is it possible to reset the number of credits a user has at the beginning of the month using the supabase UI? Through a trigger?
    g
    • 2
    • 2
  • My projects have disappeared from the dashboard
    a

    AlanK

    03/14/2023, 3:27 AM
    I have 2 Free-Tier projects. I have been working on one project and received a notification that my project page could not be reached. I logged out and then logged in through GitHUB and now my home page shows that there are no projects. I can still access both databases through PG Admin but not through the online dashboard... Does anybody have an advice, or clues as to what's going on?
    • 1
    • 2
  • supabase runs every time i open docker and won't shutdown
    w

    whaley

    03/14/2023, 5:22 AM
    i use docker for more than just supabase. all the containers use 16gb of ram. i don't want that. clicking the stop button just hangs forever. how do i prevent supabase from automatically starting?
    s
    n
    • 3
    • 3
  • Edge function: could not resolve deno executable
    a

    AlwaysBlue

    03/14/2023, 9:18 AM
    Hey, I have in the passed open two support questions both of which remain unanswered. Working with Deno and edge function is literally a nightmare now. Enabling deno gives this error in vscode
    could not resolve deno executable
    Much like this discussion: https://github.com/supabase/supabase/discussions/8779 In deno.enable paths (as mentioned in post), I added
    supabase/functions
    which makes
    .ts
    import error go but now
    cmd + click
    for import file path like this
    import { corsHeaders } from '../_shared/cors.ts';
    doesn't work. infact `cmd+click`doesn't work for anything besides
    import { serve } from 'https://deno.land/std@0.168.0/http/server.ts';
    the path with import statements like this (can only click this path
    import { serve } from 'https://deno.land/std@0.168.0/http/server.ts';
    ) literally, some documentation and support for this would be very helpful.
    g
    • 2
    • 1
  • Stuck on how to create a view.
    k

    K0stas

    03/14/2023, 9:45 AM
    I have a table "tournaments" with fields "id", "tournament_name", and a table "profiles" with fields "id", "first_name", "last_name". Inside each tournament will be several matches/games. For those games I made a table "tournaments_matches" which consists: "id" (for id of the match/game), "tournament" (relation from tournaments.id), "player_1" (relation from profiles.id), "player_2" (relation from profiles.id) I'm tyeing create a view wich will show data from tournaments and profiles tables. | tournament_id | tournament_name | match_id | player_1_id | player_1_first_name | player_1_last_name | player_2_id | player_2_first_name | player_2_last_name | I made a SQL request: create materialized view tournaments_matches_alldata as select tournaments.id as tid, tournaments.tournament_name, tournaments_matches.id as mid, profiles.id as pid_1, profiles.first_name as p1_fn, profiles.last_name as p1_ln, profiles.id as pid_2, profiles.first_name as p2_fn, profiles.last_name as p2_ln from tournaments_matches join tournaments on tournaments.id = tournament inner join profiles as player_1 on profiles.id = player_1 inner join profiles as player_2 on profiles.id = player_2; As expecterd got an error message: Failed to run sql query: invalid reference to FROM-clause entry for table "profiles" How to get data twice from the same table? How create the view in the correct way?
    s
    • 2
    • 1
  • How to generate navigation from a table database
    l

    limitlessloop

    03/14/2023, 11:16 AM
    I'm new to Supabase and SQL and I was wondering if anyone could point me in the direction of how I can create a tree-like navigation on my website from a list of products. I've found a few articles that talk about the different ways to manage hieracial data in tables, in particular the article below by Mike Hillyer. However I'm not sure how to run these commands via javascript when I'm retrieving the data on the frontend. Additionally this article only shows examples of generating the tree-like navigation excluding the products. I'd like to show the products organised by their categories. I've has some small success joining foreign tables that have a relationship to one another.
    Copy code
    js
    let { data, error } = await supabase
    .from('categories')
    .select('name, products(name)')
    But so far this only works for one level of categories. Any tips or advice would be greatly appreciated. Thank you. https://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/
    e
    • 2
    • 10
  • Self-hosting documentation/support
    x

    xax948

    03/14/2023, 11:27 AM
    Hi! we have an existing postgresql instance on cloud sql and we use firestore for front-end data. We would like to move all the data from firestore into the postgres instance, but do not want to lose the realtime features. We are currently looking at realtime as a solution for our problem. We would like to self-host on kubernetes. However, the documentation on self-hosting seems very scarce. Is there maybe some page I am missing? Or maybe commercial support package?
  • How to delete all rows where a column does not contain a value from an array?
    m

    Maarten

    03/14/2023, 11:45 AM
    I want to
    delete
    all rows from a table where a column value does not match a value from an array. I tried using
    delete().match().not()
    but it throws an error:
    Copy code
    typescript
    const statsToKeep = ['id-1', 'id-2']
    await table.delete().match({ user_id: userId }).not('COLUMN_NAME', 'in', statsToKeep);
    
    // result:
    {
      code: 'PGRST100',
      details: 'unknown single value operator not',
      hint: null,
      message: '"failed to parse filter (not.in.id-1,id-2)" (line 1, column 5)'
    }
    Any ideas how to fix this?
    g
    • 2
    • 3
  • Mistake in docs
    r

    Roko

    03/14/2023, 12:18 PM
    In case this is not the place to write - please let me know where should I write it next time. In any case: https://supabase.com/docs/guides/auth/auth-helpers/sveltekit#client-side-data-fetching-with-rls Line:
    Copy code
    typescript
       <script lang="ts">
      import type { PageData } from './$types';
    
      export let data: PageData; // <- data variable name is used here
    
      let loadedData = [];
      async function loadData() {
        //       ⬇ new data variable is created as const again
        const { data } = await data.supabase.from('test').select('*').limit(20); 
        //                       ⇧ Old data variable is beign tried to access
        // Should be deconstructed into a different name
    
        loadedData = data;
      }
    
      $: if (data.session) {
        loadData();
      }
    </script>
    
    {#if data.session}
      <p>client-side data fetching with RLS</p>
      <pre>{JSON.stringify(loadedData, null, 2)}</pre>
    {/if}
    j
    • 2
    • 1
  • After executing signInWithOAuth(), data.session is null on the redirect screen.
    u

    おまど

    03/14/2023, 1:14 PM
    Nice to meet you, I'm a new user. I am trying to implement supabase in my project. I would like to take the following steps. 1. Run the following code on my service
    Copy code
    const { data, error } = await supabase.auth.signInWithOAuth({
          provider: 'twitter',
        })
    2. Transition to TwitterAPI, authenticate 3. Redirect to my service 4. Get session information with the following codes
    Copy code
    supabase.auth.getSession().then(({data: { session }}) => {
          console.log("getSession()", session))
        })
    Thanks to the convenient supabase, 1~3 could really be implemented in an instant. However, only the last one 4. doesn't work, and the value of session is null. What I checked. * After 1, no errors occurred. * After 4, the value remains null even after reloading. * There is no session information in the cookies. * Test to change the redirection to google.com, and it was redirected correctly. * The user is not added to [https://app.supabase.com/project -> Authentication -> Manage -> Users]. (It adds automatically doesn't it?) * I asked ChatGPT but he was not helpful. Environment. * "@supabase/supabase-js":"^2.10.0", * Expo (React Native). * Project run on localhost Best regards.
    g
    e
    j
    • 4
    • 30
  • no to_char() function
    p

    PeterSon

    03/14/2023, 1:14 PM
    i need to convert a column with to_char() but supabase shows an error (no such function). can anyone help pls? thx
    g
    • 2
    • 1
  • how do i make a sign - up page in sveltekit with email confirmation?
    j

    JackBiscuits

    03/14/2023, 1:36 PM
    Hello, I am trying to use this provided in a tutorial to make a sign up page:
    Copy code
    const { data, error } = await supabase.auth.signUp({
      email: 'example@email.com',
      password: 'example-password',
    })
    what is missing to make a full page with sign-up and email confirmation?
  • replication / subscription between multiple projects
    a

    aoakalin

    03/14/2023, 2:26 PM
    Hello, I'm trying to create an administrative dashboard application, and an analytics dashboard application. What I want is, I would like to sync some data from admin db to analytics db. For example, I will use administrative dashboard to create a new game application, and generate a UUID for it. I want analytics dashboard to know that UUID, automatically, as soon as possible. I though about using DBLINK; but then saw that we can create publications. Here is what I tried: ### SUPABASE PRODUCTION PROJECT create publication PUBLICATION_1 for table table1, table2, table3; I managed to create publication and saw it on the dashboard, adding a screenshot of it as attachment. ### SUPABASE REPLICATION PROJECT CREATE SUBSCRIPTION SUBSCRIPTION_1 CONNECTION 'SECRET STUFF GOES HERE' PUBLICATION PUBLICATION_1; However, trying to create subscription on analytics project says that I need superuser access to be able to do this. I noticed this security patch: https://github.com/supabase/supabase/discussions/9314 So I'm currently stuck as my new project don't have superuser access, any help?
  • async storage/localStorage
    r

    rogie

    03/14/2023, 2:54 PM
    Hey all, I've implemented supabase in a Figma plugin and I have a couple of questions. I'm using javascript. Figma plugins do not have access to localStorage, but rather they have their own implementation of clientStorage.
    clientStorage
    happens to be async. Supabase seems to be having a problem with that async implementation, or is it something I am doing wrong? I setup supabase like so:
    Copy code
    const supabase = createClient(
        'https://xxxxxxxxx.supabase.co',
        'xxxxx'
        {
            auth: {
                storage: clientStorage
            }
        }
    )
    Then, my
    clientStorage
    looks like this:
    Copy code
    export default {
        async setItem(key, value) {
            return await FigmaScene.setClientStorage(key, value)
        },
        async getItem(key) {
            return await FigmaScene.getClientStorage(key)
        },
        async removeItem(key) {
            return await FigmaScene.deleteClientStorage(key)
        }
    }
    Does supabase support async functions for storage?
    g
    • 2
    • 6
  • Multiple row insert in flutter in single request
    n

    Neelay

    03/14/2023, 3:37 PM
    So i am trying to add certain no and the user can select multiple no at once and once selected I wanted to add the selected no in different row so is it possible to do multiple insert in a single request?
    g
    • 2
    • 6
  • Does PostgREST and GoTrue create a new postgres database user for each new user that signs up?
    k

    konga

    03/14/2023, 3:38 PM
    Or how does calling auth.uid() work? does the query set a new role and auth.uid() references that role? Or does the query set a session variable and auth.uid() references that session variable? Where do I find the code for uid()?
    g
    • 2
    • 3
  • Access token conflict
    c

    childhood

    03/14/2023, 3:57 PM
    Hi all! There was a problem. I am integrating with another service, and by the design of this service, in order for me to find out the unique key that I need, I will be redirected to my application with a specific #access _token. And he throws me out of my account and asks me to log in again. As I understand it, due to the fact that supabase, when entering through social networks, also puts #access_token after. I use nextjs
    j
    s
    • 3
    • 19
  • Scalability of Supabase
    v

    Victor G

    03/14/2023, 4:05 PM
    Hello, How scalable is Supabase ? Is there a concept of loadbalancing or do you have to wait for the kubernetes support to come out to have a scalable app ?
    g
    • 2
    • 3
  • Restrict table access for team members
    m

    Mike92988

    03/14/2023, 4:17 PM
    Is there a way to restrict access to certain tables for organization members? I see that there are 'read-only' roles, but wasn't able to find anything for restricting access to specific tables.
    g
    • 2
    • 1
  • Subscribe to multiple tables
    d

    Dontblink

    03/14/2023, 4:25 PM
    I currently have two tables I want to subscribe to and listen for changes. I have two .subscribe() functions, one in component A and one in component B both in the useEffect hook. Now what I'm noticing is that it only subscribes to one table at a time for example component A subscribes to table A and component B subscribes to table B. Only table B will get Realtime updates. Is the real time listeners limited to 1 or is there another method I need to follow to get this working properly?
    g
    • 2
    • 7
  • Full-text-search search-multiple-columns
    t

    theravenstone

    03/14/2023, 4:51 PM
    https://supabase.com/docs/guides/database/full-text-search#search-multiple-columns there is no javascript example provided. how can i search multiple cols in javascript. Is this currently possible or do i have to make two requests and merge the results together? please ping on reply
    s
    • 2
    • 2
  • auth in local
    s

    subhranshu

    03/14/2023, 5:03 PM
    I have setup my supabase project in the local with CLI and the migrations work absolutely fine. (Local --> staging --> production). Now i was trying to set up Next JS with Auth (trying to follow along this guide - https://supabase.com/docs/guides/getting-started/tutorials/with-nextjs) Bit confused about how to do it for local ENV 1st instead of hosted URL?? Does Auth really work on Local, and are there any good write-ups on this topic. Thanks & Regards!! 🙏
    x
    • 2
    • 2
  • Anyone have an example of using oauth 1 to get a users tweets?
    w

    Wee

    03/14/2023, 5:27 PM
    I'm trying to find a workaround to get oauth 1 the ability to get user tweets
  • Pricing related question
    d

    doingItAll

    03/14/2023, 5:48 PM
    Hi, On the pricing page I see that it says '$25 per month per project + usage' . Is this usage for any overage over the limits provided in the Pro plan or this means its $25 per month and then pay as you go? Thanks.
    g
    • 2
    • 1
1...166167168...230Latest