https://supabase.com/ logo
Join Discord
Powered by
# help
  • h

    Haus Of Alejandro

    06/14/2022, 7:05 PM
    Hi everybody! Is there any way to have a trigger or any kind of action/middleware in the authentication service?, like for example; what if I want to restrict the sign-up only for e-mails from a specific domain @example.com? I tried searching but can't really find anything related. Thank you so much in advance.
    n
    g
    • 3
    • 14
  • a

    ak4zh

    06/14/2022, 7:27 PM
    What causes
    Copy code
    httpx.RemoteProtocolError: Server disconnected without sending a response.
    while inserting data. I am on PRO plan but I get too many exception like below while inserting rows.
    Copy code
    File "/home/ak4zh/CodeProjects/updater/main.py", line 177, in insert_data
        return supabase.table(table_name).insert(json=json_data, upsert=upsert).execute()
      File "/home/ak4zh/CodeProjects/updater/venv/lib/python3.10/site-packages/postgrest_py/_sync/request_builder.py", line 35, in execute
        r = self.session.request(
      File "/home/ak4zh/CodeProjects/updater/venv/lib/python3.10/site-packages/httpx/_client.py", line 802, in request
        return self.send(request, auth=auth, follow_redirects=follow_redirects)
      File "/home/ak4zh/CodeProjects/updater/venv/lib/python3.10/site-packages/httpx/_client.py", line 889, in send
        response = self._send_handling_auth(
      File "/home/ak4zh/CodeProjects/updater/venv/lib/python3.10/site-packages/httpx/_client.py", line 917, in _send_handling_auth
        response = self._send_handling_redirects(
      File "/home/ak4zh/CodeProjects/updater/venv/lib/python3.10/site-packages/httpx/_client.py", line 954, in _send_handling_redirects
        response = self._send_single_request(request)
      File "/home/ak4zh/CodeProjects/updater/venv/lib/python3.10/site-packages/httpx/_client.py", line 990, in _send_single_request
        response = transport.handle_request(request)
      File "/home/ak4zh/CodeProjects/updater/venv/lib/python3.10/site-packages/httpx/_transports/default.py", line 203, in handle_request
        with map_httpcore_exceptions():
      File "/usr/lib/python3.10/contextlib.py", line 153, in __exit__
        self.gen.throw(typ, value, traceback)
      File "/home/ak4zh/CodeProjects/updater/venv/lib/python3.10/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
        raise mapped_exc(message) from exc
    httpx.RemoteProtocolError: Server disconnected without sending a response.
    n
    g
    • 3
    • 2
  • r

    revanthp

    06/14/2022, 10:01 PM
    Does the table generated by Supabase for Auth count towards the limits of the database space in the free tier?
    n
    s
    • 3
    • 2
  • d

    daviscup

    06/15/2022, 1:01 AM

    https://www.youtube.com/watch?v=qY_iQ10IUhs▾

    I am doing the Supabase Auth Deep Dive right now and somehow I'm not able to send http requests to my database. Sending a get request with the same RESTED extension to
    https://[mysupabase].supabase.co/rest/v1/[my_table_without_RLS]?select=*
    using 2 headers: 1.
    apikey: <my anon/public key>
    2.
    Authorization: Bearer <my anon/public key>
    As far as I can tell, I'm doing everything exactly like the guy in the video but I'm getting the response
    An error occurred while fetching the resource: TypeError: Failed to fetch
    . I disabled all firewalls and double checked all inputs. Did smth. about the API change since the video is over 1 year old?
    n
    g
    • 3
    • 10
  • v

    VuNguyen

    06/15/2022, 4:20 AM
    I got this weird error message when I try to upsert. I pretty sure that I removed the relation (I dropped the
    kaguya_anime
    table before and remove `mediaId`'s relation to
    kaguya_anime
    table)
    n
    • 2
    • 3
  • d

    Dembe

    06/15/2022, 7:10 AM
    Hello guys, is it possible to upload multiply images to storage at once?
    Copy code
    await supabaseAdmin.storage
            .from("gallery")
            .upload(
              `${post.category}/${post.categoryChild}/${post.file[0].name}`,
              post.file[0]
            );
    Right now i just upload one, but i want to be able to upload multiply, is that possible?
    n
    s
    • 3
    • 2
  • k

    kudziak

    06/15/2022, 7:52 AM
    hi guys. i have a question about creating rpc function, there is no info how to reference arguments in definition. SS below
    n
    h
    • 3
    • 3
  • h

    Haus Of Alejandro

    06/15/2022, 9:32 AM
    Hi everyone, I was wondering if it is possible to implement Authentication using SAML/SSO?, I want to connect with my company that uses Microsoft but I'm not sure if the auth providers are limited to social and github. Thanks in advance
    n
    j
    • 3
    • 4
  • o

    omar

    06/15/2022, 10:01 AM
    hey all, any supa auth experts?
    n
    o
    g
    • 4
    • 108
  • l

    Lior539

    06/15/2022, 10:19 AM
    Is there a way to set up Delete rules for relationships using the supabase GUI? I see a way to define the relationship, but not the delete rule
    n
    o
    • 3
    • 2
  • b

    Borisdm

    06/15/2022, 11:18 AM
    Copy code
    const { user, error } = await supabase.auth.update({password: 'new password'})
    is their a way to update another user's password? I belive the above function will update the logged in user
    n
    c
    • 3
    • 5
  • j

    Julien

    06/15/2022, 1:18 PM
    What's the difference between the two fields ``.body`` and ``.data`` after a ``select`` request from the supabase client API? It seems to be the same thing, I get exactly the same values in both fields. 🤔
    n
    s
    • 3
    • 4
  • d

    Diogovski

    06/15/2022, 3:20 PM
    has anyone here had luck with infinite scroll ? in my case i am doing a reddit clone build but i want to add a feature where instead of loading all posts when opening the page i want it to show only the lets say first 3 and then after i scroll he loads more i have accomplished what i want ( kinda ) problem is that he throws errors that i know whats the problem/why its happening but dont know a way to fix it my code
    Copy code
    import { useQuery } from '@apollo/client'
    import React, { useEffect, useState } from 'react'
    import InfiniteScroll from 'react-infinite-scroll-component'
    import { GET_ALL_POSTS, GET_ALL_POSTS_BY_TOPICO } from '../../graphql/queries'
    import { Post_Subforum } from '../../typings'
    import Post from './Post'
    
    type Props = {
      topico?: string
    }
    
    function Feed({ topico }: Props) {
      const [length, setLength] = useState(0);
      const [hasMore, setHasMore] = useState(true);
      const { data, error } = !topico ?
        useQuery(GET_ALL_POSTS, {
          variables: {
            limit: 3,
            after: length,
          }
        })
        : useQuery(GET_ALL_POSTS_BY_TOPICO, {
          variables: {
            limit: 3,
            after: length,
            topico: topico,
          }
        })
      const [posts, setPosts] = useState<Post_Subforum[]>([]);
    
      console.log(length)
    
      useEffect(() => {
        setPosts(!topico ? data?.getPostList : data?.getPostListByTopico);
        setHasMore(length >= data?.getPostList.length ? false : true)
      })
      console.log(hasMore)
    
      const getMorePosts = () => {
        setLength(length + 3);
        const newPosts = [...posts, !topico ? data?.getPostList : data?.getPostListByTopico];
        setPosts(newPosts);
      };
      return (
        <div className="mt-5 space-y-4">
          <InfiniteScroll
            dataLength={length}
            next={getMorePosts}
            hasMore={hasMore}
            loader={<h4>Loading...</h4>}
            endMessage={
              <p style={{ textAlign: "center" }}>
                <b>Yay! You have seen it all</b>
              </p>
            }
          >
            {posts?.map((post) => (
              <Post key={post.id} post={post} />
            ))}
          </InfiniteScroll>
        </div>
      )
    }
    
    export default Feed
    n
    • 2
    • 1
  • a

    Ape R Us

    06/15/2022, 4:24 PM
    hey @silentworks would you all do any youtube tutorials for the sveltekit authhelpers
    n
    s
    • 3
    • 2
  • p

    Phenomen

    06/15/2022, 5:52 PM
    I'm trying to undestand how to properly use relational data. I have a table "Projects" and "Managers". Each project has a column
    manager
    with a foreign key to manager's
    id
    . So. what if I want to display manager's
    name
    row instead of
    id
    ? I've tried this but it doesn't work
    Copy code
    Svelte
    {#each projects as project}        
        {project.manager.name || ''}       
    {/each}
    n
    o
    • 3
    • 7
  • j

    João Vitor

    06/15/2022, 6:16 PM
    How can I make authenticated requests from a Next.js API route? I have a write policy for auth.uid() = user_id and Client side works fine but not Server side
    n
    g
    • 3
    • 48
  • m

    mudkip

    06/15/2022, 6:18 PM
    it never says "received new message" even when there's been an update to the messages
    n
    g
    • 3
    • 47
  • h

    Haus Of Alejandro

    06/15/2022, 7:19 PM
    Hello everybody! Can someone suggest me a way to develop locally?, I followed the official guide but it looks like it applies for new projects and I don't get it to keep in sync the schemas and database changes. Basically what I want to achieve is to keep in sync the definitions (tables, schemas, functions, constraints, etc) for a local project with the cloud one in supabase. It is because I'm adding unit testing that need to call the API a couple of teams for every test. So, I need to delete all the data, insert new data again, compare the result for the testing iteself, etc. And I think it makes much sense if that is handled locally instead of calling the remote api in supabase (right?) thanks a lot!
    n
    • 2
    • 1
  • j

    João Vitor

    06/15/2022, 9:59 PM
    Could someone help me create my database tables for an ecommerce app?
    n
    s
    • 3
    • 3
  • b

    Borisdm

    06/15/2022, 10:15 PM
    Trying to insert user into auth.users table using rpc. Know how I can achieve this cleanly ?
    n
    g
    • 3
    • 5
  • j

    jvocodes

    06/15/2022, 11:42 PM
    Hi all! I set up Supabase auth on the server using Express, and the sign up works just fine. However, when I try to login, I get an error saying that the email has not been confirmed. I checked my settings and I have email confirmation turned off. Has anyone experienced this?
    n
    s
    • 3
    • 31
  • c

    cdro

    06/16/2022, 12:09 AM
    Hi everyone. I recently tried updating to NextJS v12.1.6 and noticed that
    @supabase/supabase-js
    can no longer be used in Edge Functions. This is because native NodeJS API's are not supported and it appears there are some dependencies of realtime-js that use these. Here is a look at the stack trace. Has anyone else come across this issue?
    Copy code
    Module not found: Can't resolve 'fs'
    
    Import trace for requested module:
    ./node_modules/bufferutil/index.js
    ./node_modules/websocket/lib/WebSocketFrame.js
    ./node_modules/websocket/lib/websocket.js
    ./node_modules/websocket/index.js
    ./node_modules/@supabase/realtime-js/dist/module/RealtimeClient.js
    ./node_modules/@supabase/realtime-js/dist/module/index.js
    ./node_modules/@supabase/supabase-js/dist/module/index.js
    ./pages/api/v0/_middleware.ts
    
    https://nextjs.org/docs/messages/module-not-found
    
    You're using a Node.js module (fs) which is not supported in the Edge Runtime.
    Learn more: https://nextjs.org/docs/api-reference/edge-runtime
    n
    g
    • 3
    • 3
  • m

    mnaircckel

    06/16/2022, 1:30 AM
    Hi all, I'm having issues setting up RLS for the first time. I'm using querying Supabase from a serverless function with Prisma, not via the API key. After enabling RLS I'm still able to access the table without restriction. I also tried adding a policy to the table to restrict everything , i.e.:
    CREATE POLICY "Restrict" ON "public"."<mytable>" AS PERMISSIVE FOR ALL TO public USING (false)
    , but that didn't yeild any results either. Select statements are still going through just fine. Am I misconfiguring something or is RLS not intended to work when connecting server-side with the connection URI?
    n
    g
    • 3
    • 4
  • q

    QueueBot

    06/16/2022, 5:01 AM
    Hi guys! I'm trying to add Streamlabs OAuth support. So far, I have the
    studio
    development server running and a local copy of Supabase running through Docker. The two seem to be able to interface with each other. Unfortunately, no OAuth options show up. This screenshot (

    https://storage.queue.bot/t/ad04mwocz.png▾

    ) has the local instance on the left and Supabase's hosted production instance on the right. I followed the instructions on and to start up the local studio frontend and Docker instance, respectively. What is the best way to move forward so I can add more OAuth options to Supabase?
    n
    s
    • 3
    • 3
  • m

    mhaezaragoza

    06/16/2022, 5:39 AM
    Hello! I'm trying to download
    testicon.png
    from a bucket named
    test
    with a folder
    test
    using the code below
    Copy code
    client!.storage.from(id: "test").download(path: "test/testicon.png")
    I receive this message:
    Copy code
    StorageError(statusCode: Optional(400), message: Optional("Not found"))
    Can anyone help me see what I'm doing wrong?
    n
    s
    s
    • 4
    • 7
  • d

    Dembe

    06/16/2022, 7:42 AM
    When i trying to login with
    Copy code
    const { user, session, error } = await supabaseAuth.auth.signIn({
          email: email,
          password: password,
        });
    I can't get to my session or user, i get null back even if i have signup before. I have no idea why is still am on Auth.js file and not on index.js which I should be when i log in
    n
    m
    g
    • 4
    • 7
  • p

    pixelhusten

    06/16/2022, 8:14 AM
    Hi what is the problem with
    upsert()
    , every time I want to edit or create an entry I get an
    error in $: not enough input
    . The entry is saved regularly, but I can't get the data from the request. In the past, this has always worked wonderfully.
    Copy code
    js
     const { data } = await client.from<ICosts>('costs')
    .upsert({
       ...costBlockWriter(payload),
       user_id: user.value.id
    })
    n
    s
    • 3
    • 3
  • m

    Mikey007

    06/16/2022, 8:23 AM
    ive been trying to login users, but getting 500 error the last few hours - anyone with the same problem atm? const { user, session, error } = await supabase.auth.signUp({ email: 'example23@email.com', password: 'example-password', }); { "code": 500, "msg": "Database error saving new user", "error_id": "9e5df685-77ea-49a7-a96b-a7d864e6719a" }
    n
    s
    • 3
    • 2
  • m

    Martin Kmieciak

    06/16/2022, 10:07 AM
    Hey! I have a problem with extending my Pro plan subscription. When I try to add a database add-on, it returns Internal Server Error.
    n
    s
    • 3
    • 2
  • s

    Shoki

    06/16/2022, 10:52 AM
    hello ! in local development with docker i tried to use google auth. i added this variables to my
    .env
    Copy code
    GOTRUE_EXTERNAL_GOOGLE_ENABLED=true
    GOTRUE_EXTERNAL_GOOGLE_CLIENT_ID=my_client_id
    GOTRUE_EXTERNAL_GOOGLE_SECRET=my_secret
    GOTRUE_EXTERNAL_GOOGLE_REDIRECT_URI=my_redirect_uri
    i restarted the containers and tried to open this URL:
    Copy code
    http://localhost:8000/auth/v1/authorize?provider=google&redirect_to=
    and got this:
    Copy code
    {
      "code": 400,
      "msg": "Unsupported provider: Provider is not enabled"
    }
    can you help me, i think i'm missing something
    n
    s
    • 3
    • 3
1...285286287...316Latest