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

    arzy

    04/15/2022, 10:31 PM
    Hey! Trying to get the Discord Auth to work and ive used
    Copy code
    const signInWithDiscord = async () => {
        const { user, session, error } = await supabase.auth.signIn({
          provider: 'discord',
        })
        console.log(user,session,error)
      }
    this to fire on button click but the page switches to the login page and loses track of user, session and error
    n
    g
    • 3
    • 10
  • d

    DeadlyDev

    04/16/2022, 12:47 AM
    Any good reading or viewing material on the new real time stuff? The demo app and blog post don't really explain much on how presence and all that works. Hoping to understand it better.
    n
    • 2
    • 1
  • p

    prototype

    04/16/2022, 1:08 AM
    👋 howdy, is it possible to add custom extensions (beyond the provided ones)? The docs point to a yes but don't seem provide answer or resources yet. Help is greatly appreciated.
    n
    g
    • 3
    • 10
  • a

    akito

    04/16/2022, 4:15 AM
    Is it possible to implement write-only RLS for buckets? I believe
    getSignedObject
    only returns the hash which means it should be possible, but I'm not really sure since I'm not familiar with buckets
    n
    • 2
    • 3
  • m

    madleo

    04/16/2022, 8:23 AM
    Hello all -- question(s) regarding storage, security, and best practice What are the pros and cons between using a public bucket and a signedURL with an expiry date of 10 years? The goal is keep the images stored and accessible from db forever or as long as possible. By utilizing a public bucket, any user, even those from outside the app can run a cascade of infinite loops to download whatever image is stored in the public bucket. Advantage here of course is the non-expiry date of the download url. For storage, is there DDOS protection, rate limiting per IP, etc? With respect to cost, even though these images are stored in cache, I imagine each cache hit incurs a download cost? Now, for the private bucket + signedURL approach -- we can set rules so that users from outside the app can't download the image. Plus, the 10 year expiry date is quite long, so that's good. And what other factors should I be considering?
    n
    • 2
    • 1
  • a

    akito

    04/16/2022, 9:05 AM
    I'm also interested in whether there's a built-in way to rate-limit file uploads to prevent malicious users from filling up a bucket, or if I should handle that manually using RLS and triggers to a separate table
    n
    • 2
    • 3
  • j

    jaitaiwan

    04/16/2022, 2:20 PM
    Hey folks, how are you supposed to handle password redirects when the supabase js library automatically seems to be removing the values in the #hash ?
    n
    • 2
    • 4
  • i

    Invader

    04/16/2022, 5:15 PM
    Is their a point to running Supabase if we aren't using the auth module and are using graphql instead of REST vs. just running a custom backend
    n
    • 2
    • 1
  • i

    Invader

    04/16/2022, 5:15 PM
    and also does the supabase GUI row level security work if you are using a custom user table and not the built in auth in supabase?
    n
    g
    • 3
    • 3
  • m

    Muezz

    04/16/2022, 7:31 PM
    In dart, I turn my
    DataModel
    into a json document using a
    toMap()
    method defined by me. I pass that document to the insert statement like this:
    Copy code
    dart
    addTransaction(DataModel data) {
        var response = _databaseService
            .insert(
              data.toMap(),
            )
            .execute();
        return response;
      }
    I want to do the same thing but in a
    Stored Procedure
    like this:
    Copy code
    dart
    addTransaction(DataModel data) {
        var response = _databaseService
            .rpc(
              data.toMap(),
            )
            .execute();
        return response;
      }
    What would be the name of the object type while defining this function? I cannot find json in the intellisense. The reason I want to do this is to be able to add some data from the json document in one table and the rest of the data in another table in one go.
    n
    v
    • 3
    • 23
  • b

    barry

    04/16/2022, 10:20 PM
    I'm a potato and I forgot how to keep the user logged in correctly...
    n
    • 2
    • 5
  • n

    Needle

    04/16/2022, 11:19 PM
    Hello @akito! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the
    /title
    command! We have solved your problem? Click the button below to archive it.
    g
    a
    • 3
    • 4
  • a

    akito

    04/17/2022, 12:32 AM
    Is there an example anyone can provide as to how to generate a unix timestamp of the current time for JSON? For instance, I have a default value for a column within a table set to
    {"timestamp":0,"accesses":0}
    but I would like to set that timestamp to the current UNIX timestamp when a row is created through a trigger
    n
    t
    • 3
    • 7
  • g

    Gamalliel_Sharon

    04/17/2022, 4:35 AM
    Hello guys, how can I get my files from the bucket via references to insert the table?
    n
    g
    • 3
    • 4
  • h

    Heni

    04/17/2022, 5:05 AM
    Is there any working way to host Supabase on a Raspberry Pi 4?
    n
    • 2
    • 2
  • o

    omri

    04/17/2022, 12:57 PM
    about how often do community-suggested postgres extensions get added to supabase? our app could really benefit from a built-in URI datatype like the one provided by
    petere/pguri
    on github. i posted on the suggestions/voting thread, just wanted to know what the chances are that it'll get accepted relatively quickly (since it isn't something as big as, say, plv8).
    n
    • 2
    • 2
  • e

    emjay

    04/17/2022, 1:37 PM
    Hi everyone, I'm trying to get past "No API Key", while I have the API key loaded in my .env. Any recommendations would help, ty.
    n
    b
    • 3
    • 24
  • g

    garyy

    04/17/2022, 1:44 PM
    Hey guys, why does importing supabase not work in Vue3? Can anybody help please
    n
    o
    s
    • 4
    • 5
  • n

    nieldv

    04/17/2022, 3:43 PM
    Hi guys, can someone explain to me what an infinite recursion on a policy means? I'm struggling to make sense of it. For example, I have a clubs table with FK relationships on club_id to clubs_users and clubs_invites. I am attaching the policies for the three tables mentioned. When doing a GET on clubs, I get a "infinite recursion detected in policy for relation \"clubs\"
    n
    g
    • 3
    • 3
  • u

    usamichizuru

    04/17/2022, 4:36 PM
    Hello guys, I encountered a problem that I cannot understand no matter what. It appeared that my realtime Supbase cannot specifically listen to DELETE however can listen to INSERT AND UPDATE. I even try to use "*" to select or event but when it came down to DELETE, it did not listen.
    n
    g
    • 3
    • 11
  • i

    isaacm

    04/17/2022, 5:02 PM
    does the supabase client when using in vercel serverless fns have any strange behaviour. I get some 500 errors (not always tho) with the message
    Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
    does the supabase client sometimes send a res? am i double sending a response in here?
    n
    • 2
    • 1
  • d

    Derek

    04/17/2022, 5:13 PM
    Does anyone know which key you need to use to get the types for typscript?
    n
    g
    • 3
    • 7
  • d

    Derek

    04/17/2022, 5:13 PM
    Documentation is not clear on that
    n
    • 2
    • 3
  • s

    sudo killall windows

    04/17/2022, 7:35 PM
    Hey everyone! Supabase has been working super great for me for quite a while, but now every request to the database errors out with
    Copy code
    json
    {
        "message": "permission denied for table http_request_queue",
        "code": "42501",
        "details": null,
        "hint": null
    }
    n
    g
    • 3
    • 13
  • a

    appurist

    04/17/2022, 9:55 PM
    Hey folks, I'm new to Supabase and have a high-level question: how would you store arbitrarily large strings? (In this case, assume they are potentially large text files, e.g. text from chapters in a book.) I'm thinking these should probably be stored as external asset files using Supabase Storage (bucket) rather than within the realtime (Postgres) database. Is that what you would do?
    n
    g
    • 3
    • 3
  • a

    appurist

    04/17/2022, 9:57 PM
    Sorry for originally posting this in #839993398554656831, I actually looked for a #843999948717555735 but I'm used to the voice channels being at the bottom and didn't see that there was more. I thought that unusual, now I see why. 😬
    n
    o
    • 3
    • 4
  • c

    CipherCode

    04/17/2022, 11:01 PM
    what's the best way to handle sessions using supabase.io? im not using Auth to authenticate, im using my own custom tables for user authentication because i wanted to use global and user salts. How should i set the cookie?
    n
    o
    • 3
    • 4
  • b

    benten

    04/18/2022, 12:47 AM
    How do I create custom rules for authentication, for example requiring that certain metadata exists?
    n
    g
    • 3
    • 17
  • b

    BumontheRun

    04/18/2022, 3:28 AM
    Is searching on the docs broken for anyone else? I see 403s from algolia in the console. "Operations quota exceeded. Change plan to get more Operations."
    n
    o
    • 3
    • 4
  • s

    stnmonroe

    04/18/2022, 4:30 AM
    I am consistently having an issue with an error:
    JWT Expired
    if I'm using the app for over an hour. This is the hook being used to attempt to update the user credentials as needed, but it doesn't work. Am I doing something wrong?
    Copy code
    js
    import { supabase } from '@root/services/supabase';
    import { useSignIn } from '@root/api/auth/mutations';
    import { useAuthState } from '@root/state/useAuthState';
    import { useMount } from 'react-use';
    
    export const useUpdateOnAuthStateChange = () => {
      const { session: localSession, setSession, clearSession } = useAuthState();
      const { mutate: signIn } = useSignIn({
        onError: (error) => console.error(error),
      });
    
      useMount(() => {
        if (localSession?.refresh_token) {
          signIn({ refreshToken: localSession.refresh_token });
        }
      });
    
      useMount(() => {
        setSession(supabase.auth.session());
        supabase.auth.onAuthStateChange((_event, session) => {
          console.log('_event :>> ', _event);
          console.log('session :>> ', session);
          if (!!session) {
            setSession(session);
          } else {
            clearSession();
          }
        });
        window.onstorage = (e) => {
          if (e.key === 'supabase.auth.token') {
            const newSession = JSON.parse(e.newValue);
            setSession(newSession?.currentSession);
          }
        };
      });
    };
    n
    b
    • 3
    • 10
1...259260261...316Latest