https://supabase.com/ logo
Join Discord
Powered by
# help-and-questions
  • How to change the email confirmation message text in `auth-helpers`?
    l

    laubonghaudoi

    01/09/2023, 6:06 AM
    This is a question about
    supabase/auth-helpers
    and I submitted a bug here https://github.com/supabase/auth-ui/issues/96 So after a user signup, there will be a message
    Check your email for the confirmation link.
    , also in the password reset step there is
    Check your email for the password reset link
    . I am unable to modify the content of these text elements nor style them, even by changing the
    messageText
    and
    messageTextDanger
    in the
    ThemeVariables
    . How to modify and style these messages?
    s
    • 2
    • 2
  • Callbacks to server-side backend after supabase.auth.signInWithOtp() ?
    d

    decruz

    01/09/2023, 6:19 AM
    Currently on the frontend, if a user makes a sign-in, Supabase will redirect the user to the default redirect URL stated in the Supabase settings, or within the redirectTo parameter. Is there anyway for a callback to be made to my own backend server? The use case is that it needs to record specific data from the social login that the user used.
    g
    • 2
    • 2
  • Sign in with OTP without Link
    n

    nahtnam

    01/09/2023, 8:42 AM
    Hello, Is there a way to do signing in with an OTP but without a link? Instead I would like to send a 6 digit number to the email and just have them type that in my app
    g
    • 2
    • 4
  • migration strategy to migrate postgresql DB to supabase
    f

    flapili (FR, bad EN)

    01/09/2023, 9:04 AM
    Hi
    s
    • 2
    • 5
  • Single Device Login functionality
    k

    karankartikeya07

    01/09/2023, 9:16 AM
    Hey everyone, I was exploring Supabase Docs and was wondering how can I implement Single device sign in at the same time using Supabase auth. Regards
    j
    g
    • 3
    • 4
  • Cannot delete a table row
    m

    MaGnezij

    01/09/2023, 10:02 AM
    I am trying to delete a single row in a table, and it does not work. It does not work if i try to do it in the GUI or with the SQL query. It does not return any error, it returns success, but when I refresh the row is still there. Any ideas why?
    c
    f
    g
    • 4
    • 13
  • flutter push notifications
    q

    quick_piper15

    01/09/2023, 12:26 PM
    Hello, how can I use background push notifications in my flutter application?
  • How to use a newly created SQL function?
    l

    legousk

    01/09/2023, 12:54 PM
    I have created a new function, but when I try to use it it does not work. I get the response from Supabase that I might need to reload the schema cache. I have already tried some things like NOTIFY, but I am still getting the error. I encountered this issue already some time before, but normally it took some time for the function to be useable in my Vue app, but now it seems to take longer that I was used to. What is the best way to make sure that my functions are available to my app?
    g
    • 2
    • 13
  • Working with NestJS & Adding a users table
    t

    travyXBT

    01/09/2023, 12:59 PM
    Is there a best practice for using supabase with NestJS? Cause I'd still want to verify the requests sent from the client. My main question is about having a need to create a Users table, should it be created and assigning the id as foreign key to user_id from the protected db? And if so, how do I add the user also to that table after signing up, is there a webhook or something that allows me to get updates on the registration?
    r
    j
    • 3
    • 3
  • does setSession trigger onAuthStateChange?
    b

    baddoh99

    01/09/2023, 2:10 PM
    I'm currently using Expo's AuthSession and supabase. In v1 I made use of the sign in with the refresh token that I would get from my third party provider. I've since upgraded to v2 and haven't seen much on the sign in with refresh token. I've tried using setSession with the access_token and refresh_token from my provider which returns a new session object only thing is that onAuthStateChange is not being fired. Am I using this right?
    j
    r
    g
    • 4
    • 19
  • Seed issue
    g

    Gero

    01/09/2023, 2:19 PM
    Hi I m not able to seed the postgres with my data integration pipeline. After 1h run, i got a query timeout exception. Error occurred during query execution: ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Error { kind: Db, cause: Some(DbError { severity: "ERROR", parsed_severity: Some(Error), code: SqlState(E57014), message: "canceling statement due to statement timeout", detail: None, hint: None, position: None, where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("postgres.c"), line: Some(3314), routine: Some("ProcessInterrupts") }) }) }) Sometime, i can resume the work, sometime, nothing works anymore. I even cant access to the database page. It say, "connection to database". and I have to restart the whole project.
    s
    • 2
    • 6
  • What does 'freeze column' do in the dashboard ?
    g

    garyaustin

    01/09/2023, 2:30 PM
    Locks it on screen if you scroll left to right I believe.
    r
    • 2
    • 2
  • RLS - policy based on insert value
    r

    Roko

    01/09/2023, 3:43 PM
    Does something like soon-to-be-inserted-value variable exist in row policies? Like for example
    new.id
    in functions? I'd like to have policy similar to this:
    NOT(select 1 from public.project_staff where project_id = new.id and role_id = 3)
    Meaning if there is no role_id=3 for this project - allow insert. I'm trying to allow insert into a table only if there is no row existing with specific conditions yet. Basically triggering initial row insert. Any other attempts to insert should be satisfying some other row policy.
    s
    • 2
    • 2
  • Stripe create customer throws error with code copied from supabase happy hour 14
    l

    lake_mattiato

    01/09/2023, 3:59 PM
    Hello, I am using the following code:
    Copy code
    js
    import { serve } from "https://deno.land/std@0.131.0/http/server.ts";
    import Stripe from "https://esm.sh/stripe?target=deno";
    import { createClient } from "https://esm.sh/@supabase/supabase-js@1.35.5";
    
    const stripe = Stripe(Deno.env.get("STRIPE_KEY")!, {
      httpClient: Stripe.createFetchHttpClient(),
    });
    
    const supabase = createClient(
      Deno.env.get("SUPABASE_URL")!,
      Deno.env.get("SUPABASE_SERVICE_ROLE_KEY")!
    );
    
    serve(async (req) => {
      const { record } = await req.json();
    
      const customer = await stripe.customers.create({
        email: record.email,
        metadata: {
          supabase_id: record.id,
        },
      });
    
      const { data, error } = await supabase
        .from("user_data")
        .update({
          stripe_customer_id: customer.id,
        })
        .match({ id: record.id });
    
      console.log({ data, error, customer });
    
      return new Response(JSON.stringify({ customer_stripe_id: customer.id }), {
        headers: { "Content-Type": "application/json" },
      });
    });
    but when i try to deploy the edge function
    Copy code
    supabase functions deploy create-stripe-customer --project-ref SECRET
    I get the following error:
    Copy code
    Error: Error bundling function: exit status 1
    file:///src/index.ts
    error: Uncaught (in promise) Error: Relative import path "http" not prefixed with / or ./ or ../
          const ret = new Error(getStringFromWasm0(arg0, arg1));
                      ^
        at __wbg_new_8d2af00bc1e329ee (https://deno.land/x/eszip@v0.30.0/eszip_wasm.generated.js:312:19)
        at <anonymous> (https://deno.land/x/eszip@v0.30.0/eszip_wasm_bg.wasm:1:79439)
        at <anonymous> (https://deno.land/x/eszip@v0.30.0/eszip_wasm_bg.wasm:1:1388039)
        at <anonymous> (https://deno.land/x/eszip@v0.30.0/eszip_wasm_bg.wasm:1:1862894)
        at __wbg_adapter_18 (https://deno.land/x/eszip@v0.30.0/eszip_wasm.generated.js:146:6)
        at real (https://deno.land/x/eszip@v0.30.0/eszip_wasm.generated.js:130:14)
  • Can't alter the role of user authenticator
    r

    Renan Ferreira

    01/09/2023, 4:26 PM
    Since the
    postgres
    user does not have
    superuser
    permissions anymore, I'm unable to update the schemas available to " PostgREST". Any attempt to change the
    authenticator
    user results in:
    Copy code
    sql
    Failed to run sql query: "authenticator" is a reserved role, only superusers can modify it
    I have reported this problem in this discussion: https://github.com/supabase/supabase/discussions/9314#discussioncomment-4469017 And created the following issue: https://github.com/supabase/supabase/issues/11167 Is this a use case that Supabase cloud will not support? Thanks in advance
    g
    • 2
    • 2
  • Auth logs
    s

    sudoDeznit

    01/09/2023, 4:46 PM
    Hi. I made a SaaS and marketing it as privacy friendly alternative. I don't save users IP address or log them on my end but I noticed Supabase logging them. Is there any way to stop logging metadata like users IP address?
    g
    • 2
    • 1
  • signInWithOAuth on React Native using Javascript V2?
    d

    dexsnake

    01/09/2023, 4:48 PM
    I am trying to implement OAuth sign in with a few social providers and I am not seeing any documentation around passing Access/Refresh tokens to the SignInWithOAuth method. I poked around some issue on Github and seems like there is no support for this in V2 yet? Does anyone have a solution/work around using the rest api?
    j
    • 2
    • 7
  • Login with OTP and Google with same email doesnt work
    k

    kresimirgalic

    01/09/2023, 5:47 PM
    I am doing a login with OTP and Google, but the case is this: - first i use this to get a code:
    Copy code
    const { data, error } = await supabase.auth.signInWithOtp({
        phone,
      });
    - then i verify the code
    Copy code
    const { data, error } = await supabase.auth.verifyOtp({
        phone,
        token,
        type: 'sms',
      });
    - after that in my app i ran through setup profile where i enter my email and store it like this:
    Copy code
    const { data, error } = await supabase
        .from('profiles')
        .upsert(values)
        .select()
        .single();
    
    await supabaseAdmin.auth.admin.updateUserById(data.id, {
        email_confirm: true,
        email: values.email,
        user_metadata: {
          is_onboarded: true,
        },
      });
    - in setting i tried both ways to disabled email confirmation, and also tried to manually add property email_confirm: true but every time i try login with google, i am getting the error that i cant save new user in database, probably because i already have that user in auth from docs, accounts with same email should be one account and should use one email and login inside the app. can you help me with this?
    g
    • 2
    • 2
  • Supabase auth, How to display OTP login link error
    s

    syeonlove

    01/09/2023, 6:09 PM
    Is there an easy way to display error in React visible in URL if the magic link was for example expired:
    http://localhost:3000/#error=unauthorized_client&error_code=401&error_description=Email+link+is+invalid+or+has+expired
    Is there a list of Supabase auth error codes if I want to also translate the errors? πŸ™‚
  • What do you guys use for non-secret environment var in edge functions ?
    a

    Alaanor

    01/09/2023, 6:47 PM
    should I just use
    supabase secrets
    ?
    j
    • 2
    • 2
  • The latest build of Studio is broken for local hosting.
    m

    mingfang

    01/09/2023, 6:52 PM
    After running
    npm run build
    , you'll see that the
    PUBLIC_URL
    is burned into the build in
    .next
    directory, and not reading from the environment variable at runtime.
    • 1
    • 1
  • Integer vs BIGINT ?
    y

    yayza_

    01/09/2023, 7:30 PM
    When I create a table in the Supabase table editor it sets the ID column to Int8 (bigint), in my connected dbSchema intance, whenever I create an ID column it auto-sets it to Integer (int4) and I have to always change it to bigint since I figured Supabase knows what's best for my postgres database. For the sake of learning, I was just wondering what the difference was. I'm trying to find a way to default to bigint in DBSchema, but I haven't found anything yet. dbschema seems good so far but being new if anyone can recommend a better software to connect and visually create tables like this I would really appreciate it, I'm new to relational db design and it definitely helps to set up my relational mappings visually. πŸ˜‡
    t
    • 2
    • 4
  • S3 Compatible Storage Support
    j

    Jam

    01/09/2023, 7:56 PM
    Hey there, are there plans to support custom storage endpoints for S3-compatible backends? such as described in this GitHub issue for the Storage API: https://github.com/supabase/storage-api/issues/27
    g
    • 2
    • 1
  • Duplicate email on signup
    h

    Hugos

    01/09/2023, 8:50 PM
    Whenever i sign up a user i get a 200 code which is nice so i can give an appropiate message on my frontend so the user knows he signed up, when i try to sign up again using the same email i also get a 200, why is this exactly? and how can i verify if an email has been taken or not because this isnt very user friendly
    y
    • 2
    • 10
  • Default Edge Function Timeout Period
    m

    Marc A

    01/09/2023, 8:51 PM
    Can anyone confirm if the default timeout for an Edge function is 5 minutes 300,000ms? Also, can this be changed? If so how please?
    c
    d
    • 3
    • 2
  • timeout issues post superuser changes
    j

    jez

    01/09/2023, 9:46 PM
    I am trying to add a lot of rows to a supabase table in an operation that takes about 10 minutes (long story, but I have thousands of .DAT files that I parse and modify, then want to upload certain clean values into the supabase table). I now get timeout errors doing this. I had success previously modifying the timeout using: *alter role authenticated set statement_timeout = '600s'; (https://supabase.com/docs/guides/database/timeouts). * However post the changes to superusers now (https://github.com/supabase/supabase/discussions/9314) when I do this I get this error (noting I am the sole owner of this database): *Failed to run sql query: "authenticated" is a reserved role, only superusers can modify it. * It will return success if I change the session timeout (eg set statement_timeout to 600000), but I still get timed out when I perform the upload. Are there any good options here to extend the timeout? I know there are some workarounds like doing a local instance of the database and then migrating it when the data is up, or else upload all the data to a giant CSV first, but I'd rather avoid that if possible. The low timeouts will definitely cause me issues in the future so wanted to solve it on the hosted version ideally.
    g
    • 2
    • 4
  • Cannot update row in
    i

    ilyadynin

    01/09/2023, 10:01 PM
    I'm just trying around and I am trying to update the profiles field in my database by the authenticated user when the session user id matches with the profiles user_id value (and it does so), though no changes apply. Does anybody know what could be the reason?
    d
    m
    • 3
    • 13
  • 406 Error with a .maybeSingle() or .single() endpoint using RTK Query
    p

    petoma

    01/09/2023, 10:20 PM
    I am using RTK Query and I have the following endpoing: getScoreByPreloadId: builder.query({ queryFn: async (ids) => { const {data, error} = await supabase .from('scores') .select() .eq('userID',ids.userID) .eq('preloadID',ids.preloadID) .maybeSingle() return { data, error } }, providesTags: ["ScoreByPreloadId"] }), Then I call the hook useGetScoreByPreloadIdQuery(ids) from a component which is populated in the screen with a map() method, which means that each one of them will retrieve its particular Score based in the userID and preloadID. My issue is that I obtain in the console the 406 error. Here is a screenshot of the console.log of the data obtained with the hook in a screen where there are 6 cards (components) calling this endpoint. Any help will be appreciated. Thanks!
    g
    n
    s
    • 4
    • 7
  • Delete multiple rows from SDK
    k

    kpradel

    01/09/2023, 10:56 PM
    Feeling a bit dense at the moment. Does anyone know how to delete multiple rows from the js library? await supabase.from('countries').delete().eq('id', countryId); But for multiple records.
    g
    • 2
    • 4
  • How do I create a RLS Policy where on insert it checks the subfolder to match the user id?
    k

    konga

    01/09/2023, 11:11 PM
    I have a bucket called "profile-pics" and the user's profile pic would be stored something like "/profile-pics/123/image.jpg" where 123 is the user id. How do I make sure that the specific user is the only one who can insert, update, and delete from that subfolder but everyone can have read access to their profile picture?
    g
    b
    u
    • 4
    • 7
1...929394...230Latest