https://supabase.com/ logo
Join Discord
Powered by
# help-and-questions
  • I currently self hosted supabase in my server but its shows an error in Dashboard
    a

    AskarNab

    05/03/2023, 7:49 PM
    This error shows up while I try to see the logs

    https://cdn.discordapp.com/attachments/1103408104114225233/1103408104286208141/image.png▾

    r
    • 2
    • 6
  • Limit on column count with free tier?
    t

    tonyroma

    05/03/2023, 8:34 PM
    Is there a limit on columns in a table with the free tier? writes to my 17th column in the table cause fetch errors
    g
    • 2
    • 2
  • password reset does not sign in the user
    k

    KiwiHour

    05/03/2023, 8:57 PM
    From reading the documentation, I got the impression that when clicking the password reset link from the email. It would sign in the user. But instead I get "Auth session missing!" error. i've read through the posts in this discord server about this issue, but none have fixed my problem. Can anyone help?

    https://cdn.discordapp.com/attachments/1103425241566412890/1103425241696448523/image.png▾

    https://cdn.discordapp.com/attachments/1103425241566412890/1103425241973276763/image.png▾

    u
    t
    s
    • 4
    • 6
  • How to find out what is causing "INVALID SQL" error in admin web Ui SQL editor?
    d

    davout

    05/03/2023, 8:58 PM
    I've hit a brick wall whilst trying to create a new logical view from the admin web UI SQL editor. There is no insight as what the problem is, as the UI only reports a "INVALID SQL" message. I can't see any entry in the logs that might provide the missing info. Suggestions?
    g
    • 2
    • 9
  • Delays in Twilio Registration Process
    j

    Jolly Joy

    05/03/2023, 9:13 PM
    Wondering if anyone else has encountered issues with the Twilio registration process. It's been a week since I submitted a service ticket for brand registration and 10DLC Onboarding, but my application is still under review. Has anyone else faced similar delays or challenges with their Twilio registration? Any insights or suggestions on how to expedite the process would be greatly appreciated. Thanks!
  • "Delete Row" missing?
    a

    AmusedGrape

    05/03/2023, 10:19 PM
    All I see is "Copy Cell Content" but no "Delete Row" when right-clicking on a row. Is this an issue with Supabase or was some perm removed for me (I'm not the project owner technically) There is an empty space where "Delete Row" should be.
  • Revoking JWT and/or access token?
    d

    dave

    05/03/2023, 11:05 PM
    What exactly is
    auth.admin.signOut
    supposed to stop? Even after signing out, I'm still able to update the user... which doesn't make sense to me.
    Copy code
    typescript
      const { error } = await supabase_client_admin.auth.admin.signOut(session.data.session.access_token);
      console.debug(`error: ${JSON.stringify(error, null, 2)}`);
    
      const supabase_client_newtmp = createClient(c.env.SUPABASE_URL, c.env.SUPABASE_KEY, {
        auth: {
          persistSession: false
        }
      })
    
      await supabase_client_newtmp.auth.setSession({
        access_token: session.data.session.access_token,
        refresh_token: session.data.session.refresh_token
      })
    
      // This should fail, no?
      const updated_result = await supabase_client_newtmp.auth.updateUser({
        data: {
          demo: Date.now().toString()
        }
      })
      console.debug(`updated_result: ${JSON.stringify(updated_result, null, 2)}`);
    g
    s
    • 3
    • 27
  • Do i use `access_token` in the callback?
    i

    IvLa

    05/04/2023, 12:15 AM
    Trying to make a login system that uses the Discord oauth2. Do I use the
    access_token
    field as the jwt token? and use that to verify the user and have them be logged in etc
  • Is Postgres sharded or how does it scale?
    r

    Romstar

    05/04/2023, 12:54 AM
    Is Postgres sharded and is there a storage limit or is there bottomless storage where old data goes
  • Need help actually setting the session and making it so the user can actually be logged into my site
    i

    IvLa

    05/04/2023, 1:01 AM
    Copy code
    py
    @app.get("/login")
    async def login_with_discord(response: Response):
        oauth_flow = supabase_client.auth.sign_in_with_oauth({"provider": "discord"})
        oauth_url = oauth_flow.url
        response = RedirectResponse(url=oauth_url)
        return response
    
    
    
    @app.get("/")
    async def home(request: Request):
      user = supabase_client.auth.get_session()
      print(user)
      return
    Currently user prints
    None
    . Supabase is redirecting the user to the "/" endpoint with the anchors at the end of the url but I can't access those obvi. So how do I set the users session??
    k
    • 2
    • 2
  • Citus has sharded postgres. Does supabase offer something similar?
    r

    Romstar

    05/04/2023, 1:09 AM
    What are the limitations for Supbase's Postgres offering? Is the data sharded? Is there a hard limit for the disk storage?
  • RLS troubles, on profile id and user id
    t

    tk

    05/04/2023, 1:32 AM
    I am preparing to launch the beta version of my app, and want to implement the right RLS security. When I have this RLS function:
    Copy code
    BEGIN;
      ALTER POLICY "Enable read access for all users" ON "public"."profiles" USING ((id = auth.uid());
    COMMIT;
    I am not able to update the 'subscribed_status' which is on the profiles table. but when I have this :
    Copy code
    BEGIN;
      ALTER POLICY "Enable read access for all users" ON "public"."profiles" USING true;
    COMMIT;
    The functionality does work as expected and I am able to update the. I included a few log statements where I update the field and the log statements are saying that it is working, however the database itself is not updating
    Copy code
    Fetching subscribed status for user with ID: 22f46b47-94de-439f-9db4-341795442847
    feed.tsx:151 Current subscribed status for user: false
    feed.tsx:153 Updating subscribed_status for user with ID: 22f46b47-94de-439f-9db4-341795442847
    feed.tsx:167 Subscribed status updated successfully
    I have no idea what could be going on, and would appreciate any help. (I have checked this is the right user, and both auth and profile are using uuid for id)
    g
    • 2
    • 37
  • Integration problems with storage that OpenDAL meets
    x

    xuanwo

    05/04/2023, 1:35 AM
    Hi, We are from OpenDAL community: https://github.com/apache/incubator-opendal, a data access layer that allows users to easily and efficiently retrieve data from various storage services in an unified way. We added supabase storage support recently (which means users can access supabase storage via OpenDAL using the same rust/python/nodejs API). However, they are some issues about `storage-api`: - https://github.com/supabase/storage-api/issues/133: can't upload filename with special chars. - https://github.com/supabase/storage-api/issues/322: can't get object with RANGE header - https://github.com/supabase/storage-api/issues/323: HEAD not exist object generates incorrect status code Most of them should be easy to fix but need maintianer to choose the correct direction (because of breaking changes). Can we work together to fix those issues? Thank you in advance.
    g
    • 2
    • 1
  • Multi query and multiple table
    m

    Mashwishi

    05/04/2023, 3:38 AM
    Copy code
    tsx
                const { data } = await supabase
                .from('chats')
                .insert({ message: newTodo, user_id: session.user.id })
                .from('user')
                .update({ coins: userCoins - 10 }).eq('id', session.user.id)
                .select()
    g
    • 2
    • 3
  • Do edge functions really care what the request URI is?
    v

    ven

    05/04/2023, 3:49 AM
    in this example - https://github.com/thorwebdev/edgy-edge-functions/blob/main/supabase/functions/database-webhook/index.ts - @thorwebdev uses a switch statement for INSERT / UPDATE / DELETE. i guess event SELECT (one/all) can be performed with a switch statement on a POST request. what is the best practice here? are edge functions different? other than semantics how should i be thinking about this? would it be safer if the URI was more explicit? if so, can Supabase design the function creation with a index.get.ts or index.post.ts and so on so that we get that added layer of safety when creating the edge function.
    t
    • 2
    • 14
  • Query 2 Foreign Keys in Graphql on same table
    k

    Kai___

    05/04/2023, 4:49 AM
    I am trying to build a message table where there's a sent_user_id and a received_user_id but when I use the graphql query as profiles(*) I am getting many to 1 300 error. How can I alias each of the columns in Graphql without doing subsequent api calls?
    • 1
    • 1
  • I recently made a new project on Supabase, auth in cookies now?
    r

    RB_Gaura

    05/04/2023, 6:24 AM
    Previously supabase seemed to store everything as tokens in localStorage, and I was using a client based context provider to handle auth. This time, I'm using Next.js app directory, and it looks like auth state is being stored in cookies. I'm running a lot of my auth stuff on the server this time. Although I'm logging in client-side using a context provider. My code is p similar to as follows: https://supabase.com/docs/guides/auth/auth-helpers/nextjs-server-components I'm wondering whether this means supabase is doing session authentication? or is it still jwt based auth? And if so, why on cookies? I login from a client based component, so I find that really confusing.
    g
    • 2
    • 4
  • Redirect after auth does not work
    c

    crimsen

    05/04/2023, 9:19 AM
    i searched for answers for this question on github but i've done some researches but that didn't solve my problem, i shared all the screenshots related to this problem and i hope i get some help here ? Note: i'm still applying only google auth provider, i didn't touch facebook provider yet

    https://cdn.discordapp.com/attachments/1103611847673925704/1103611847896203274/1.png▾

    https://cdn.discordapp.com/attachments/1103611847673925704/1103611848139485305/22.png▾

    https://cdn.discordapp.com/attachments/1103611847673925704/1103611848445677628/3.png▾

    https://cdn.discordapp.com/attachments/1103611847673925704/1103611848688926740/4.png▾

    r
    • 2
    • 5
  • How to use only passwordless from this signin.tsx?
    l

    Lucas974

    05/04/2023, 9:26 AM
    How can I open directly the magicLink? I don't want to use the user/password auth.
    Copy code
    import { useRouter } from 'next/router';
    import { useEffect } from 'react';
    import { useUser, useSupabaseClient } from '@supabase/auth-helpers-react';
    import { Auth } from '@supabase/auth-ui-react';
    import { ThemeSupa } from '@supabase/auth-ui-shared';
    
    import LoadingDots from '@/components/ui/LoadingDots';
    import Logo from '@/components/icons/Logo';
    import { getURL } from '@/utils/helpers';
    
    const SignIn = () => {
      const router = useRouter();
      const user = useUser();
      const supabaseClient = useSupabaseClient();
    
      useEffect(() => {
        if (user) {
          router.replace('/account');
        }
      }, [user]);
    
      if (!user)
        return (
          <div className="flex justify-center height-screen-helper">
            <div className="flex flex-col justify-between max-w-lg p-3 m-auto w-80 ">
              <div className="flex justify-center pb-12 ">
                <Logo width="64px" height="64px" />
              </div>
              <div className="flex flex-col space-y-4">
                <Auth
                  supabaseClient={supabaseClient}
                  providers={[]}
                  redirectTo={getURL()}
                  magicLink={true}
                  appearance={{
                    theme: ThemeSupa,
                    variables: {
                      default: {
                        colors: {
                          brand: '#404040',
                          brandAccent: '#52525b'
                        }
                      }
                    }
                  }}
                  theme="dark"
                />
              </div>
            </div>
          </div>
        );
    
      return (
        <div className="m-6">
          <LoadingDots />
        </div>
      );
    };
    
    export default SignIn;
    Thank's!
  • Dev and Prod for Authentication Site URL?
    t

    TrickyMick

    05/04/2023, 9:29 AM
    My site is still in development but I have already deployed my site to hosting and I am testing various functions in the hosted instance. To test locally/in hosting, I keep needing to flip my Authentication -> Site URL between localhost and my hosted URL.... and when I am testing locally, my hosted site of course won't work. is there a way to setup a dev/prod environment so I can have both working?
    g
    d
    s
    • 4
    • 4
  • Error duplicate key valueviolates unique constraint"refresh_tokens_pkey"
    h

    Hhorn

    05/04/2023, 10:22 AM
    Hi, since a few days signing in with supabase returns this error message often. After a few attempts it works most of the time, but I don‘t know how to fix this error. I would appreciate any help, Thank you!
  • Double proxy, getting ratelimited.
    d

    DannyDanDan

    05/04/2023, 10:33 AM
    Hi! We're trying to use Supabase auth in a selfhosted environment with Cloudflare and NGINX proxy manager. But we think it is using the connecting ip instead of the forwarded ip by npm cause it is ratelimiting us. Does it check this or have we misconfigured something? I've checked it through creating a simple webserver (https://ip.hexidev.nl/) and it is indeed sending the correct ip in the X-Forwarded-For header. This seems to be an issue with supabase.
    h
    g
    • 3
    • 12
  • Sign-In immediate redirect when accessing studio URL
    r

    ReditusDei-

    05/04/2023, 11:17 AM
    on self hosted, I get immediately redirected + I cant select auth providers from the studio authentication tab. What am I doing wrong? I read the docs that I should get basic authentication in place for studio, but this seems to be outdated since there IS a sign-in page? Thx
    • 1
    • 3
  • Refreshing session in Flutter
    g

    goldyman

    05/04/2023, 1:27 PM
    I'm struggling with the lib. Too many methods that are unclear when and how to call and what to do with them. I have setSession, refreshSession, recoverSession. I'm not sure under what condition I can call them, which one to call at the start of the app, which on resumed, which on paused, and exit. Should I care about this at all or supabase will take care of refreshing the session when there is unexpired refreshToken? I've found this example https://github.com/phamhieu/supabase-dart-demo/blob/main/lib/screens/splash_screen.dart Which is a bit old and could be obsolete. It doesn't use refreshSession, then why we have it? What I can do with it?
  • Supabase Provider giving me module not found error
    g

    Grimmjoww231

    05/04/2023, 2:18 PM
    hope every one is doing good. i have been connected to supabase but now trying to switch to session storage instead of local. any time i wrap my RootLayout with the supabaseProvider, i get this error: error - ./node_modules/next/dist/compiled/@vercel/og/index.node.js:17950:0 Module not found: Can't resolve 'fs' ill keep searching but would be very grateful for any guidance
  • Constant db migration attempts
    p

    Palsson

    05/04/2023, 2:33 PM
    When i check the logs of auth logs i see constant attempts to migrate the database. I also get 502 errors while trying to use supabase authentication which i think might be related. The image attached is the error i'm seeing in supabase logs. Have anyone seen an error lik this and know a way to resolve it?

    https://cdn.discordapp.com/attachments/1103690967745302528/1103690967862747238/image.png▾

    g
    • 2
    • 3
  • How do I set `config.Mailer.OtpLength`?
    d

    dave

    05/04/2023, 3:07 PM
    How do I adjust the
    OtpLength
    for the mailer?

    https://cdn.discordapp.com/attachments/1103699378566336544/1103699379073843290/image.png▾

    g
    • 2
    • 15
  • Using Supabase Admin Client from Local Edge Functions Gives Weird OS Error
    j

    JoseProGDP

    05/04/2023, 3:42 PM
    I am getting a strange error when trying to use the supabase admin client from within functions, mainly:
    Copy code
    error sending request for url (http://localhost:54321/auth/v1/admin/users?page=&per_page=): error trying to connect: tcp connect error: Cannot assign requested address (os error 99)
    The code I am using is:
    Copy code
    javascript
    
    serve(async (_) => {
      const res = await supabase.auth.admin
        .listUsers();
    
      return new Response(JSON.stringify(res), {
        status: 200,
        headers: { ...corsHeaders, "Content-Type": "application/json" },
      });
    });
    And I'm initializing the
    supabase
    client like so:
    Copy code
    javascript
    const supabase = createClient(
      "http://localhost:54321",
      "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU",
      {
        auth: {
          autoRefreshToken: false,
          persistSession: false,
        },
      },
    );
    If I do the same thing on the client, rather than from a Deno edge function, it works. I only get this error from Deno-side. I know the function is deploying correctly, because I do get the response, just without the user data.
    v
    • 2
    • 13
  • Auth user_metadata with typescript?
    e

    Epailes

    05/04/2023, 4:06 PM
    Is there a way to have typescript working with user_metadata? Or examples anyone can share of how to get something close to that working?
  • Where does supabase docker store files ?
    j

    Jacko

    05/04/2023, 4:32 PM
    Where does supabase docker store files on the pc and is it possible to encrypt them ?
1...201202203...230Latest