https://supabase.com/ logo
Join Discord
Powered by
# help-and-questions
  • Delete account that user is logged into
    w

    Whoman

    05/07/2023, 4:28 PM
    I didnt see anything in supabase sdk (v2) that talks about deleting user account's for now i just decided to make a random password for them so that they become inaccessible but thats not really deleting so how do i actually delete it?
    g
    • 2
    • 1
  • Create CI for project without dev environment set
    t

    Tal Mikey

    05/07/2023, 4:33 PM
    Hi, I have a Supabase project with schemas, triggers and actions which is in remote hosting. Now, I want to create a development and production environments. I create a local db, but now I don't know how to copy all the tables, triggers and function to it. Also, after doing it, what next? how do I keep track of function and triggers automatically from development to production?
  • What is auth.flow_state?
    b

    brassotron

    05/07/2023, 5:05 PM
    Hello, I consistently run into migration issues relating to auth.flow_state when running db reset or similar? It seems to get introduced into the migrations after a user is registered for the first time? 🤔
    g
    s
    • 3
    • 35
  • signInWithOAuth
    r

    reachlinlen

    05/07/2023, 5:12 PM
    signInWithOAuth is not a function while signIn works. Using @supabase/supabase-js": "^1.35.7".
    g
    • 2
    • 1
  • How to change email on local host?
    j

    jdgamble555

    05/07/2023, 8:52 PM
    I'm calling:
    Copy code
    ts
    const { error } = await supabase.auth.updateUser({ email });
    However, nothing happens except for
    new_email
    gets updated. I don't want to require confirmations on localhost, and my localhost doesn't seem to send out confirmations... so in reality it is two problems. config.toml
    Copy code
    py
    [auth.email]
    # Allow/disallow new user signups via email to your project.
    enable_signup = true
    # If enabled, a user will be required to confirm any email change on both the old, and new email
    # addresses. If disabled, only the new email is required to confirm.
    double_confirm_changes = false
    # If enabled, users need to confirm their email address before signing in.
    enable_confirmations = false
    J
    v
    s
    • 3
    • 26
  • Password forgotten emails don't arrive
    i

    indymaat

    05/07/2023, 9:24 PM
    For some reason. I am on a free plan, Magic links do arrive? What can i check?
    g
    • 2
    • 4
  • Sign-In user via API request or server-side
    s

    sb

    05/07/2023, 11:25 PM
    Hi all! We implemented our own in-house WhatsApp OTP verification. Our "hacky" solution was to return a magic link generated via
    supabase.auth.admin.generateLink
    and then do
    router.push(magicLink)
    . We're facing an issue where the browser navigation stack is corrupted (our app -> supabase url -> our app) which means that when a user logs in, goes to a route, then clicks back (router.back), it removes them from our application. This leads to a confusing flow for a logged in user. The ideal solution is to be able to log in the user via the server-side. For example:
    const response = fetch('/api/otp-login')
    , wherein the supabase client adds the proper authorization headers to the user's cookies / request headers. Is this possible?
  • Passing the PageData session to a component in SvelteKit
    e

    ethanfox

    05/07/2023, 11:43 PM
    Is it possible to pass
    Copy code
    import type { PageData } from './$types';
    
    export let data: PageData;
    To a component so I can read, write, and update from a component rather than just a +page in Sveltekit? I have nested components in order to make things easier to read/follow but there is only an example in the SvelteKit Auth Helpers involving a +page.svelte and no svelte component. Is this possible? When using method provided in the JS SDK documentation the RLS kicks in and prevents any updates since there is no session.
    s
    j
    • 3
    • 2
  • migration database to RDS
    o

    okxiaoliang4

    05/08/2023, 2:11 AM
    Can i use the AWS RDS to self hosting?
  • How to Match at least one filter using .or() in an endpoint url
    s

    Sassan

    05/08/2023, 2:17 AM
    I need to match at least one filter using .or() As explained in the docs here: https://supabase.com/docs/reference/javascript/or Code from docs: const { data, error } = await supabase .from('countries') .select('name') .or('id.eq.2,name.eq.Algeria') but how do I wrap my filters in an endpoint url? Example: supabase.co/rest/v1/table?select=*&type=eq.1&tags=in.(tag-1,tag-2) Say I wanna filter for type=eq.1 or tag='tag-1' or 'tag-2'
    g
    • 2
    • 35
  • Need help selecting relation
    s

    SANTlAG0

    05/08/2023, 2:30 AM
    I got the following query
    Copy code
    const { data, error } = await supabase
              .from("profiles")
              .select(
                `
                  credits,
                  accounts: user_id (
                    account_name
                  )
                `
              )
              .eq("id", user.id)
              .single();
    However is not working and im not sure why. My account table has a field the following field
    constraint accounts_user_id_fkey foreign key (user_id) references auth.users (id),
    The profile.id is the same as the user_id Can someone help me how to get this to work?
    g
    • 2
    • 4
  • Supabase Start Errors on Latest CLI
    a

    Aditya Tripathi

    05/08/2023, 6:03 AM
    Since 1.55.0, Supabase CLI fails to start the images. Receiving the following error "INCORRECT_DOMAIN" SQLState P0001 Updated to the newest patch, no luck.

    https://cdn.discordapp.com/attachments/1105012149002195014/1105012149132214292/image.png▾

    • 1
    • 2
  • how to add some tag when a user signing up?
    v

    vinciarts

    05/08/2023, 6:36 AM
    e.g. I want to add a referral tag to every new user, but it seems the whole flow are controlled by Supabase.
    g
    • 2
    • 2
  • failed SASL auth (FATAL: SASL authentication failed (SQLSTATE 08P01))
    t

    Tal Mikey

    05/08/2023, 7:22 AM
    I run
    npx supabase db remote commit
    and got this error : failed to connect : failed SASL auth (FATAL: SASL authentication failed (SQLSTATE 08P01)). Any ideas?
  • "Transfer" database/ project?
    l

    lennard.

    05/08/2023, 7:43 AM
    Hey! Is there any chance to transfer a database to someone else? I have their e-mail. Greetings, Lennard
    r
    • 2
    • 7
  • Failed to run sql query: invalid input syntax for type integer
    r

    Rytterboi

    05/08/2023, 8:11 AM
    When i call this postgreSQL function
  • checking if i can close a post?
    r

    RB_Gaura

    05/08/2023, 8:24 AM
    dewkjwd
    • 1
    • 1
  • How to add user meta data with `Auth` component from @supabase/auth-ui-react
    s

    Sarcodo

    05/08/2023, 10:24 AM
    Trying to add user meta data via sign up but can't seem to find which props on the auth component would allow this. I have a signup function like this:
    Copy code
    signUp: ({ email, password }) => {
          console.log({ email, password });
    
          return supabase.auth.signUp({
            email,
            password,
            options: {
              data: {
                hi: 'Will',
                age: 10
              }
            }
          });
        },
    Which lives in an
    <AuthContext>
    component which wraps the app, but the signup doesn't get called, looks like it's due to the
    Auth
    component handling it's own login / signup stuff through
    supabase.auth.onAuthStateChange
    . So what's the best way to add user meta data when using that
    Auth
    component
    s
    • 2
    • 5
  • Hosting a slack bot
    g

    GRACKATTACK

    05/08/2023, 10:28 AM
    Does supabase have an app hosting service similar to something like Heroku to host my slackbot? Would that be done via edge function deployment?
    g
    • 2
    • 1
  • [RESOLVED] Graph in other schema is not exposed
    c

    Corton

    05/08/2023, 11:25 AM
    I generated the next_auth schema from the template in the SQL editor, which has the
    next_auth.users
    table. When using a
    service_role
    token, I can query and mutate with the graph because I have configured it to expose the graph on the project settings. However, when I use an
    authenticated
    token, I can not do anything as the graph seems not exposed to authenticated users. I have granted SELECT and UPDATE to authenticated users:
    Copy code
    select
      pg_catalog.has_table_privilege('authenticated', 'next_auth.users', 'SELECT') as has_select,
        pg_catalog.has_table_privilege('authenticated', 'next_auth.users', 'UPDATE') as has_update;
    this returns true for both
    has_select
    and
    has_update
    . I have enabled RLS to restrict users from updating other records. This is the result of the mutation:
    Copy code
    {
      "data": null,
      "errors": [
        {
          "message": "Unknown field \"updateusersCollection\" on type Mutation"
        }
      ]
    }
    g
    • 2
    • 3
  • magic link problem
    f

    fred kufner

    05/08/2023, 12:41 PM
    Was working yesterday User receive's magic link email, but signin link is bad: https://fjidejd.r.af.d.sendibt2.com/tr/cl/sukFSOG81k7zGPrt-ZtkR5ZZHd364FuJ1Vt_lYsQWFr_iuLAob3q2aq1TqgOZZkXg_07ROMcbBh-d_nhUaZ4mY0jX0jyy0MXwBxFV_rCiVFZ1uIwhDs8h0Xsgjra-whW0Ay2UB1XYg1DTftfZyWfMSeDhhbomXEFeJ63_RxVaXvZK0jBoQArsqlYcI0iURZLR6rNiBrF27MHrEKB28US_vO79eNr_K_h6HR2KHpmpb6_UwsEU0IvIB9RYt18-_3nLu-AQLL-WVEn5CFbcYD8uZjBYrKGzP8Kvu66MuhAV2cia6vASQ8iW1DhQXV6j1XwkXTpp7ljWMhMXvEwssP6-Lr1Slbf6xoT6lyWGagZj67qAlRZ4xKWhXCQnHWoGeqpgV9-Q2wK6jRB8h_nD8m4pOxkDrJHN1U9-PN5DyWB1UbAMHsDUCPjv3q6HG2qIJJv39o-jDdOLJKIaYDFT9jI

    https://cdn.discordapp.com/attachments/1105112202542862388/1105112202698039296/CleanShot_2023-05-08_at_08.40.10.png▾

    d
    • 2
    • 4
  • not able to force RLS on a a couple of table(s)
    v

    ven

    05/08/2023, 1:30 PM
    I have a public.contact_me. I using the following SQL command
    Copy code
    -- -- table public.contact_me
    alter table public.contact_me force row level security;
    in the SQL studio. I get a
    Copy code
    success. no rows returned
    message. when i tab over to the tables view in the studio and select the contact_us table it flashes "no RLS enabled on the table". Its weird because i have 4 tables in the db right now and I have successfully enabled rls on 2 of them using the same command. I have this same issue on another table. any thoughts? thanks
    g
    • 2
    • 3
  • PL/pgSQL Assistance
    n

    Nin

    05/08/2023, 1:34 PM
    Hi there, I'm still relatively new to PL/pgSQL and have a query that I would like to make a function of but not really sure that would work.
    Copy code
    sql
    WITH input_coords(q, r) AS (
          VALUES
            (0, 0), (0, -1), (1, -1), (1, 0), (0, 1), (-1, 1), (-1, 0), (0, -2), (1, -2), (2, -2), (2, -1), (2, 0), (1, 1), (0, 2), (-1, 2), (-2, 2), (-2, 1), (-2, 0), (-1, -1), (0, -3), (1, -3), (2, -3), (3, -3), (3, -2), (3, -1), (3, 0), (2, 1), (1, 2), (0, 3), (-1, 3), (-2, 3), (-3, 3), (-3, 2), (-3, 1), (-3, 0), (-2, -1), (-1, -2)
        )
        SELECT
          g.id,
          g.coords,
          g.moisture,
          g.elevation
        FROM
          public.grid g
        JOIN input_coords ic ON (g.coords).q = ic.q AND (g.coords).r = ic.r;
    How would I transform this to a function where the values are dynamic?
  • allow update ONLY a column with RLS
    t

    towc

    05/08/2023, 1:53 PM
    goal:
    authenticated
    users should be able to
    update
    their own row, but only specific columns. It's easy to create a policy to allow thse users to
    update
    their own row, but I can't figure out how to prevent them from changing critical columns, like
    id
    or the
    plan
    they're subscribed to. We have small configuration columns like
    color_scheme
    , which if we can avoid having to go through our backend to modify, it would be nice. We do use these columns in the backend occasionally, storing them client-side only is not great. And the less code we have to change after enabling RLS, the better. So if we only have to add an RLS policy, that would be great. I hoped it could be solved by checking the critical columns in the
    USING
    or
    WITH CHECK
    clauses, e.g.
    (new.id = old.id) and (new.plan = old.plan)
    , but
    new
    and
    old
    don't seem to be available within those clauses. Any ideas?
    g
    • 2
    • 5
  • Not able to delete from Storage Bucket
    z

    zerefati

    05/08/2023, 2:06 PM
    I have a public folder named 'images' and I am able to upload images to the folder, but I am unable to delete images from the folder. I have also set up all the policies for my bucket, but when I try to delete an image, the remove function returns null, although the function is executed successfully.

    https://cdn.discordapp.com/attachments/1105133509519081503/1105133509837856898/Screenshot_2023-05-08_at_5.04.16_PM.png▾

    g
    • 2
    • 7
  • Supabase doen't update table after Stripe Payment
    и

    иuғe

    05/08/2023, 2:07 PM
    Hi I have connected Stripe wtih my project and the payment works fine but when the payment succeed , Supabase doesn't update user row

    https://cdn.discordapp.com/attachments/1105133848469180517/1105134159543934976/image.png▾

    g
    • 2
    • 6
  • Can you view Enums in the studio?
    v

    ven

    05/08/2023, 2:21 PM
    just curious how postgres handles enums. where are they in the schema? i even tried locating them with a pgAdmin client.
    • 1
    • 5
  • HIPAA compliance
    v

    ven

    05/08/2023, 2:30 PM
    Is Supabase hipaa compliant? I remember reading something about getting SOC2 compliance and on path to hipaa. asking for a friend.
    n
    • 2
    • 3
  • bs
    i

    infinity

    05/08/2023, 2:44 PM
    Is supabase still accepting applications for SupaSquad? If so which of the available interests roles are in most need of a contributor now? How many hours of commitment does supabase expect from an interested contributor? Is a history of previous contributions to supabase required to get accepted in the supasquad program or is previous record of contributing to other FOSS enough?
    g
    • 2
    • 5
  • Unable to connect to server using DB connection info
    c

    ceN

    05/08/2023, 2:56 PM
    I'm trying to use PGAdmin to connect to my DB using the info provided in the Database Settings section of the Project Settings page. Host: db.grpaexgnmkfthgmprehb.supabase.co Port: 5432 User: postgres Password: ** PGAdmin gives me "Unable to connect to server.... Timeout expired". Not sure what is going on
    n
    • 2
    • 1
1...205206207...230Latest