https://supabase.com/ logo
Join Discord
Powered by
# help-and-questions
  • how to connect supabase with android studio
    x

    xyz

    01/04/2023, 8:27 PM
    I didn't find any docs for connesting supabase to my android studio project and aslo absolutely nothing for java
    s
    g
    • 3
    • 2
  • signInWithPassword authentication session does not persist and is not avail thru useSupabaseUser()
    c

    christer

    01/04/2023, 8:52 PM
    I've been stuck for hours trying to get signInWithPassword to work in my Nuxt 3 project without any luck, now I am sad and confused. When I run the following code, it console.logs the user id etc:
    Copy code
    const { auth } = useSupabaseClient()
      const signIn = async () => {
        const { data, error } = await auth.signInWithPassword({ 
          email: email.value,
          password: password.value
        })
        
        if (error) {
          return alert('Something went wrong !')
        }
        if(data.user.id){
          console.log(data)
          //router.push('/account/portfolio')
        }
      }
    (i have tried multiple iterations of it, like const supabase = useSupabaseClient(), without const {data, error} etc etc) This is the code that is giving me errors:
    Copy code
    const user = useSupabaseUser()
    
    
      const { data } = await useAsyncData('address_line', async () => {
        let { data } = await supabase
          .from('accounts')
          .select('address_line')
          .eq('user_id', user.value.id)
          .single()
        return data
      })
    Could anyone please a practical example of how this is done the proper way?
    b
    n
    • 3
    • 8
  • RLS policy on join
    d

    dont

    01/04/2023, 9:28 PM
    I am trying to write a policy which allows a user to get all
    teams
    where that users
    id
    is joined with the team in the
    team_members
    table. I have this so far, but it is returning all teams, this rls is on the
    teams
    table
    Copy code
    (auth.uid() = ( SELECT team_members.user_id
       FROM team_members
      WHERE (team_members.user_id = auth.uid())))
    g
    • 2
    • 33
  • Poll - What is your preferred method for saving relational data?
    b

    Brian

    01/04/2023, 9:49 PM
    Vote by clicking the emoji of your choice. 💻 = multiple calls from the client (insert then update fk) 🚀 = rpc function 🔫 = database trigger
    m
    s
    +2
    • 5
    • 12
  • Vanity domains on own domain?
    z

    zetashift

    01/04/2023, 10:08 PM
    For a small PoC at work, whenever a company registers(won't be a lot, in the 10-100) companies, we have have to create a subdomain lik
    foo.workdomain.io
    where
    foo
    is a company name. This process needs to be automated somewhat. Is this a problem https://supabase.com/docs/guides/platform/custom-domains#vanity-subdomains vanity domains can solve, or am I better off looking at other options?
    • 1
    • 1
  • Best way to check new rows in table every second
    v

    vadim

    01/04/2023, 11:32 PM
    Hi there, I need to check updates in table every second. What is the best solution for this? Now I created Edge Function which check table every second (works like daemon in infinit while cycle). Why don't I use database triggers/webhooks? After checking table I need to make a request to third-party service and I can't do it more than one time per second.
    g
    k
    • 3
    • 3
  • Run migrations on self-hosted supabase
    h

    hensou

    01/04/2023, 11:36 PM
    Hi, Is there any way to remotly run the migrations on a self-hosted supabase?
  • Is there a way to increase the number of Edge functions per project?
    g

    Guy Rozen

    01/04/2023, 11:42 PM
    I've noticed that there is a hard limit of 10 edge functions for a project, atleast for the free tier one. Do paid tiers have higher limitations? I haven't seen any mention regarding this limitation or limitation increases whatsoever...
    g
    a
    • 3
    • 5
  • Bug in OpenAPI definition after adding view
    n

    nkeating

    01/04/2023, 11:59 PM
    I have a projects table, which has a foreign key place_id to the places table. The API spec response, for the projects definition, correctly returned in this case. "place_id": { "description": "Note:\nThis is a Foreign Key to
    places.id
    .", "format": "bigint", "type": "integer" }, I then added a view create view my_view as select pl.col1, pl.col2, pl.col3, pl.id, array_agg(f.path) as paths from files f inner join projects_files pf on pf.file_id = f.id left join projects p on p.id = pf.project_id inner join places pl on pl.id = p.place_id group by pl.col1, pl.id; After adding this view the API spec now returns "place_id": { "description": "Note:\nThis is a Foreign Key to
    my_view.id
    .", "format": "bigint", "type": "integer" }, I rely on this response to build values in my app, and this is causing things to break. The foreign key on projects is still obviously pointing to places and not to this view. Can someone please let me know why this could be happening and what I can do to fix this? I need the id from places in my view, so that is unavoidable, is there a workaround? Has anyone else faced this issue? Look forward to any help here!
  • View not being created when using pgsodium and security label on table
    j

    Jingly

    01/05/2023, 12:05 AM
    I've been following the basic steps for setting up an encrypted column using pgsodium. I managed to get it working somewhat, and can see the encrypted data on the table. But the view decrypted_ is not being created when the security label is put on the table. I'm currently working locally, supabase cli v@1.28.2. Pgsodium v@3.0.4. My project does not have the vault available yet, but I thought I gathered from the blog posts that TCE would still work, although I could be mistaken.
    h
    • 2
    • 1
  • Table Joining
    l

    luke90275

    01/05/2023, 12:09 AM
    Hi, I'm creating a social media where users should be suggested mutual friends. So I have a usr table where each user has a unique id. I also have a follower table that has a userId as well as a followerId. Essentially I want to create an api call that gets the most common userIds of users that a user's following are following. I could do this easily with 2 seperate api calls (1 to get all of the users following and then another to find the most common userIds where the followerId is in that array of following, but I believe that would be significantly slower/more costly [but correct me if I'm wrong with that]). Any ideas? Any and all help would be greatly appreciated!
    g
    • 2
    • 1
  • Strava Authentication with Supabase
    p

    Pythonic

    01/05/2023, 1:27 AM
    Hi there, I was wondering what is the best way to go about using a custom OAuth 2.0 provider like Strava with Supabase since it isn't an officially supported provider? I looked into using custom Authorization with the Authorization header when creating the client:
    Copy code
    ts
    import { createClient } from '@supabase/supabase-js';
    
    createClient(SUPABASE_URL, SUPABASE_ANON_KEY, {global: { headers: {
      Authorization: `Bearer ${access_token}`
    }}})
    However does this only work if the
    access_token
    doesn't change? With OAuth the access token for each user has to be refreshed every 6 hours, so would I be able to initialize a client with the new access token and it will give me the correct user? Thanks.
    • 1
    • 1
  • Migrate from Firestore
    s

    SimonPotvin

    01/05/2023, 2:05 AM
    Hello, migrating from Firestore work with their tool for small collections. One with 245 rows (users) gets uploaded to 25,000 users. It is duplicated. Is there a way to avoid that? I need to upload anoter project where I will have 50,000 users, it won`t work this way...
    g
    • 2
    • 3
  • contains search
    c

    car

    01/05/2023, 2:42 AM
    is there any way to check if text CONTAINS something else when filtering in the web dash the web dash is important this needs to be accessible to non coders and i don't feel like making my own dash
    g
    • 2
    • 14
  • Reddit OAuth?
    p

    pickwickian

    01/05/2023, 3:18 AM
    Is this on the roadmap right now? It's one of the providers I wanted to support.
    g
    • 2
    • 1
  • How to manage production and dev environments?
    c

    Cheqo

    01/05/2023, 3:21 AM
    Hello, I want to let other developers work on my project, something that I never done before. I just wanted to know, how does it usually work? If you wanted someone to collaborate on your project, would you create another supabase database project and give developer supabase, stripe api keys for development databases? If so, is there an easy way to clone my existing supabase project?
    m
    k
    +3
    • 6
    • 17
  • How to init new tables and seed data with code?
    a

    alxT

    01/05/2023, 3:30 AM
    I'm not seeing anything in the docs about this. Would i just use an edge function for this? For context: I already have the models and relations coded out, real data in a csv. Basically, looking for a way to automate migrating form aws to supabase.
    g
    • 2
    • 6
  • Records not copying when duplicating table
    c

    czypnt

    01/05/2023, 4:02 AM
    Whenever I duplicate a table and check the copy the data over, the table is made with the same columns but there is no data that is copied over.
    g
    • 2
    • 17
  • Is there anyway references for ‘continuous’ edge functions? Like a function fires periodically…
    d

    DeepITM

    01/05/2023, 4:16 AM
    Like the title says…anyway references or example would help
    g
    s
    • 3
    • 3
  • allow signup for only members of my org
    q

    quick_piper15

    01/05/2023, 4:48 AM
    Hello, say I have a table with phone numbers/emails I can accept. How do I implement conditional signup?
    u
    • 2
    • 16
  • how to pull post likes along with posts
    r

    rinorzk

    01/05/2023, 6:10 AM
    I have a table of posts, and now I want to implement likes for posts. I planned on creating another table for likes (storing the user id and post id) as that seems the most straight forward way to go about it. Now I want to show the likes of a post, how would I pull the together from both tables. Is rpc functions the only way?
    h
    g
    k
    • 4
    • 7
  • Question about supabase oauth in mobile.
    i

    izurugi

    01/05/2023, 9:48 AM
    So I was trying to setup oauth authentication for my react native application. I saw a blog post about supabase authentication here and noticed that it opens a webview to sign in your account in this example google oauth2 url. I was looking for like a firebase solution in which the application doesn't require webview to open a link but opens the google directly like this. Is this possible, I can't find any example of this on react native.
    • 1
    • 2
  • Set up send email with mailersend
    s

    sinrabo

    01/05/2023, 10:13 AM
    Hi guys. I trying to setup send email with mailer send by this post: https://github.com/burggraf/supabase-mailer/blob/main/Mail_Providers/Mailersend.md But I get stuck in step 1: Failed to run sql query: relation "private.keys" does not exist How can I add API key into supabase?
    j
    • 2
    • 1
  • How to encrypt email
    c

    CherterB

    01/05/2023, 11:21 AM
    Is there a way to encrypt email before its being inserted in auth.users?
    t
    s
    • 3
    • 6
  • Why is pg_jsonschema gone in the newest image?
    k

    KirioXX

    01/05/2023, 11:33 AM
    Hi, I just updated my supabase cli and pulled fresh images. Is there any reason why pg_jsonschema is not included anymore as an extension? Thanks!
    g
    • 2
    • 9
  • How to perform multiple supabase calls in js
    m

    MaheshtheDev

    01/05/2023, 11:42 AM
    i need data for all products created by me and i need data of all products that i brought.
    p
    g
    k
    • 4
    • 4
  • Filter out rows if user id is in array
    k

    kresimirgalic

    01/05/2023, 12:40 PM
    I want to to filter out rows if row has an id in swipes array, how can i do that? The main idea is to have a tinder like filtering, i need to find out how is swiped and filter out those users. Maybe if someone has a better solution.
    g
    • 2
    • 1
  • React Native SetSession
    r

    Rridrock

    01/05/2023, 1:01 PM
    Hey guys, I try to implement the Password recovery flow inside my React Native application. After Parsing the Deeplink I call
    Copy code
    supabase.auth .setSession({ access_token: accessToken, refresh_token: refreshToken, })
    The app is subscribed to supabase.auth.onAuthStateChange but setSession doesn't call _notifyAllSubscribers, so app cannot recognize when the user is signed in.
    g
    j
    • 3
    • 13
  • Using the 'is_super_admin' field for user ok?
    l

    Ladlum

    01/05/2023, 1:57 PM
    When inspecting the users table, there is a field 'is_super_admin'. Is this used for some internal mechanisms in Supabase and should I stay away from using it for my users in the project, or is it ok to use it for my needs where some special users could have it enabled?
    g
    • 2
    • 3
  • Supabase storage pricing
    m

    Mihai Andrei

    01/05/2023, 3:42 PM
    Hello! Accesing an image from a public bucket caches that image on the cdn for 1h. Does accesing that image 100 times in that hour count as storage Egress? Or only the first time before it caches. I’ve looked here https://supabase.com/docs/guides/storage/cdn But i am not really sure where the storage Egress is counted
    g
    • 2
    • 3
1...888990...230Latest