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

    Ape R Us

    04/10/2022, 11:53 PM
    Copy code
    export const user = readable(null, (set) => {
        set(supabase.auth.user());
        const unsubscribe = supabase.auth.onAuthStateChange((_, session) => {
            session ? set(session.user) : set(null);
        });
        return () => {
            unsubscribe.data.unsubscribe();
        };
    });
    n
    • 2
    • 1
  • j

    jar

    04/11/2022, 12:35 AM
    How can u make a default value be a unique string. I see timestamps u can put now() can i have something for default unique usernames?
    n
    g
    • 3
    • 8
  • l

    Lika3llobo

    04/11/2022, 5:25 AM
    Hi πŸ™‚ A question about authentication: is it possible to set more than one SiteURL and what is the difference to RedirectURL?
    n
    • 2
    • 2
  • j

    joshcowan25

    04/11/2022, 5:38 AM
    Are Edge functions the kind of function that would allow using headless browser with like playwright to take screenshot of other websites?
    n
    • 2
    • 1
  • k

    koho

    04/11/2022, 6:17 AM
    Hey, one question about auth, what is the cause of this?😡
    n
    s
    g
    • 4
    • 7
  • j

    JZFLei

    04/11/2022, 7:47 AM
    Hello, will Edge Functions be available to self hosted instances?
    n
    • 2
    • 3
  • i

    icesilt.eth

    04/11/2022, 9:02 AM
    I can't sync my database changes:Error: P1002 The database server at `db.cmzuajdtzjncqespzjmt.supabase.co`:`5432` was reached but timed out
    n
    s
    m
    • 4
    • 5
  • n

    Needle

    04/11/2022, 9:03 AM
    Hello @icesilt.eth! 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.
  • n

    Needle

    04/11/2022, 9:04 AM
    Hello @icesilt.eth! 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.
    • 1
    • 2
  • a

    anon_123

    04/11/2022, 10:42 AM
    Is it safe to use
    auth.users.id
    as a foreign key relation on my data? Example: I have a list of posts (visible to everyone) these posts have a
    user_id
    that is the aforementioned foreign key. Now if userA goes and looks at userBs post:
    supabase.from('posts').select('*').match({ id: userA.id })
    he is gonna get the
    user_id
    too! Is this bad? Should I have a seperate table? What could go wrong? Does supabase have column level security like for example Keystone?
    n
    g
    • 3
    • 5
  • j

    jar

    04/11/2022, 3:54 PM
    For plpgsql im new learning but how do u get a value in a table. I have table color with id and text. If I say select text from color where id = 3 weather there is 10 or 1 row returned its still a table not a row right. So even if its one row β€œblue” how do i get it as a row rather than table. Or if i have a table as a declared var is it like js can do color[3] for 3rd index and get the actual row
    n
    s
    • 3
    • 8
  • a

    Ape R Us

    04/11/2022, 5:28 PM
    @silentworks im fetching data from 2 tables like this via endpoint
    Copy code
    const { data: events, error } = await supabase
                .from('event')
                .select('name,organiser, event_branding(*)')
                .eq('is_live', 'false');
    and im getting the data and can pass the props to a component after the each block like this
    Copy code
    {#each events as event}
      <EventCard {...event} />
    {/each}
    however the coloums in the event_branding table is also an array, how do i get that out in the new component . sent a pick as well
    n
    s
    • 3
    • 10
  • y

    YogSothot

    04/11/2022, 5:45 PM
    hello everyone! I'm a complete newbye trying my first supabase app (with Flutter). I'm just trying to complete the tutorial, with email and magic link auth, but I'm stuck... I receive the email with a link to localhost port 3000 (but there's nothing listening there on my mobile), I tried to replace it with the API url but I get a routing error... can someone point me in the right direction?
    n
    • 2
    • 1
  • e

    Erwin

    04/11/2022, 5:55 PM
    Hello everyone! Is the GraphQL endpoint supposed to work with the current version of the Supabase CLI? I'm trying to fetch the schema from my local instance and Kong is returning
    {"message":"no Route matched with those values"}
    n
    s
    • 3
    • 3
  • a

    anon_123

    04/11/2022, 6:26 PM
    Lets say I have a admin dashboard in my SPA that I only want authenticated users to have access to. Can I just assume that the user is authenticated, enable RLS and redirect the user back to a login screen when getting a not authorized error back from supabase? I have only started using supabase / (and client side auth in general) over the weekend. So just wanna hear if I understood it correctly and otherwise told why my approach is wrong πŸ™‚ The alternative I assume would be to constantly do a
    supabase.auth.user()
    check
    n
    g
    • 3
    • 9
  • j

    justcode123

    04/11/2022, 6:53 PM
    I cant find any videos that explain how to display data from tables. Is it just a .map()?
    n
    g
    • 3
    • 3
  • a

    AmusedGrape

    04/11/2022, 7:14 PM
    how can i reset/refresh the provider access token? (for me i'm using the discord provider and i need to access the api), i have the provider_token passed to the callback but its invalid and i can't use it.
    n
    l
    • 3
    • 4
  • v

    VM

    04/11/2022, 7:19 PM
    trying to create a new bucket, and it seems Supabase is not allowing underscores in the name anymore? is that a semi-recent change?
    n
    • 2
    • 1
  • c

    CipherCode

    04/11/2022, 9:37 PM
    so, im trying to get a column from a table that's selected
    Copy code
    js
    async function user_salt(user) {
      let database = await supabase
        .from("user")
        .select("user_salt")
        .eq("email", user.email);
    
        return database.user_salt;
    }
    but its returning a Promise
    n
    s
    g
    • 4
    • 16
  • j

    jar

    04/12/2022, 4:21 AM
    Is there a naming convention for naming tables. Like singular or plural should table name be cities or city
    n
    p
    • 3
    • 4
  • p

    Paul

    04/12/2022, 5:18 AM
    can someone please help me with realtime? I feel like I'm losing my mind! I enable the table, which is in the public schema, for replication in the console, but nothing shows up on the client Sometimes, the enable will automatically be disabled without me doing anything However, it works fine on some tables I've made a couple weeks ago. I checked permissions for anon, authenticated, and service_role, and they all have full access. I'm really at a loss Please any help would be appreciated I also manually set replica to fulll
    n
    g
    • 3
    • 6
  • j

    jar

    04/12/2022, 6:05 AM
    can you call other functions in a trigger? I want to fill the username field on insert of profile
    Copy code
    -- declare
      -- newusername text := generate_available_username();
      -- newusername text := uuid_generate_v4();
    begin
      insert into public.profiles(username)
      values(uuid_generate_v4());
      return new;
    end
    or
    Copy code
    begin
      new.username := uuid_generate_v4();
      return new;
    end
    n
    g
    • 3
    • 20
  • a

    anon_123

    04/12/2022, 8:37 AM
    Can I (as admin of the db) or supabase (the company) view users passwords? Or are they stored completely encrypted?
    n
    g
    • 3
    • 4
  • k

    kingpeppe

    04/12/2022, 9:22 AM
    Hi, I'm trying to update the column column ethBalance in a row with the ethAddress passed in the function but i keep getting ".update is not a function"
    Copy code
    js
    export const updateEthBalance = async (ethAddress, ethBalance) => {
      const { data, error } = await supabase.from('users').select().eq('ethAddress', ethAddress).update({ ethBalance: ethBalance })
      console.log(data);
    };
    Am I doing it wrong?
    n
    t
    • 3
    • 13
  • n

    Needle

    04/12/2022, 9:57 AM
    Hello @daviscup! 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.
  • d

    djeglin

    04/12/2022, 11:13 AM
    Hello all. I have recently started seeing a serverless function I have falling over, seemingly in the process of making Supabase calls. Upon looking in to this, I went to investigate the Supabase logs and found a whole load of errors saying
    Copy code
    password authentication failed for user "postgres"
    – Is this normal?
    n
    s
    • 3
    • 3
  • j

    justcode123

    04/12/2022, 11:53 AM
    Is this a good example of how to get data from my Tables? I keep getting a error of β€œcant ….something .0 or .1….
    Copy code
    import { useEffect, useState } from 'react';
    import { supabase } from '../lib/initSupabase';
    
    export default function CountryList() {
      const [countries, setCountries] = useState([]);
    
      useEffect(() => {
        fetchCountries();
      }, []);
    
      const fetchCountries = async () => {
        const { data: countries } = await supabase
          .from('countries')
          .select('*')
          .order('name', true);
        setCountries(countries);
      };
    
      return (
        <ul>
          {countries.map((country) => (
            <li key={country.id}>{country.name}</li>
          ))}
        </ul>
      );
    }
    n
    s
    • 3
    • 3
  • v

    vbaluch

    04/12/2022, 12:40 PM
    Are there any known issues with instance creation right now? When I try to connect to the database with Postico (version 2.0beta (9393)) the connection attempt does not succeed and I get the error message "SSL SYSCALL error: EOF detected". In the Postgres logs I see a FATAL error "the database system is in recovery mode". I tried to delete the project and created another one, the same thing happened.
    n
    g
    d
    • 4
    • 15
  • s

    Scotty

    04/12/2022, 12:53 PM
    hey, does supabase have a dev and production enviornment for a single project? I'm trying to avoid testing on prod
    n
    s
    • 3
    • 3
  • p

    Paul

    04/12/2022, 1:53 PM
    How do we view logs locally?
    n
    • 2
    • 1
1...256257258...316Latest