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

    wario

    09/25/2021, 6:11 PM
    does anyone know how to fix the browser alert I get saying "JWT expired"? I followed a react auth tutorial and not sure what is causing this
    s
    m
    • 3
    • 4
  • l

    larryM

    09/25/2021, 6:31 PM
    Is there a current bug with Phone Auth? Im trying to set up a user account with having "Enable phone confirmations" disabled, but it still shows as "Waiting for verification.." on my authentication dashboard
  • l

    larryM

    09/25/2021, 6:43 PM
    Or is there a way to disable the OTP so we can provide a custom exprience
  • l

    larryM

    09/25/2021, 6:43 PM
    ?
  • m

    mkromann

    09/25/2021, 6:51 PM
    Hi 🙂 I am using Supabase Storage to host images. And I am sort of new to cloud Storage but I have been wondering what the best practice is to download multiple files with the Supabase API? Currently I am doing a request for each file .. is there a smarter way to do it? Thanks in advance! /Magnus
  • m

    MDobs

    09/25/2021, 10:48 PM
    @User the authentication process produces a JWT token that is valid for (by default) 3600seconds (1h) you can increase that from the Supabase admin settings. When that token expires the user much either re-login/authenticate or you can silently refresh it via some function calls (check the documentation)
  • w

    wario

    09/26/2021, 5:22 AM
    Thanks so much for answering! Yeah I read the docs but could not figure out what's going on since I should be logged out instead of eventually seeing a "JWT expired" alert right? I tried deleting the JWT from localstorage and db queries from all my routes still work and I'm still logged in unless I hit refresh. Am I missing something where I have to handle logging out users? (I thought that this should happen automatically when the token expires)
  • m

    MDobs

    09/26/2021, 6:06 AM
    I would think not, the library cannot enforce how you handle your Application or UX, you might want to throw a modal, or log them out or anything really. There is an event onUnauthenticated that is fired when the jwt token expires and you try to perform a request, so you should probably handle the log-out there
  • s

    silentworks

    09/26/2021, 9:48 AM
    JWT expiring
  • h

    HorseShoe

    09/26/2021, 12:45 PM
    How do i count in supabase? Probably a very noob question..
  • h

    HorseShoe

    09/26/2021, 12:45 PM
    I tried
  • h

    HorseShoe

    09/26/2021, 12:46 PM
    Copy code
    javascript
    supabase.from("table").select("*", { count:  "exact" })
  • h

    HorseShoe

    09/26/2021, 12:46 PM
    but doesnt seem to work
  • h

    HorseShoe

    09/26/2021, 12:46 PM
    i am just getting all the columns instead
  • h

    HorseShoe

    09/26/2021, 12:46 PM
    i tried selecting a specific column too that just returns the column value
  • h

    HorseShoe

    09/26/2021, 12:46 PM
    and providing head = true in the opts just returns null
  • h

    HorseShoe

    09/26/2021, 12:47 PM
    and is there anyway i can run sql statements directly like
    supabase.execute("SELECT * FROM table")
    ?
  • g

    garyaustin

    09/26/2021, 2:21 PM
    Are you doing const { data, error, count } = await supabase.... and looking at count?
  • m

    Marky

    09/26/2021, 7:40 PM
    I’ve just been using pgclient as supabase doesn’t have transactional support , stored procedures, or Python support. Found it much easier.
  • j

    javorszky

    09/26/2021, 9:21 PM
    Hello folks! I have a question about one of the fields for project settings. The General -> Site url's explanation says "The base URL of your website. Used as an allow-list for redirects and for constructing URLs used in emails.". As it's a list, how are we to enter multiple allowed URLs there? If the list of domains is a comma separated list, the magic link will contain the entirety of the field value landing on the first site, and causing all sorts of 404 issues or bad url problems. What am I doing wrong? 🙂
  • s

    silentworks

    09/26/2021, 10:02 PM
    This is not possible as there are security issues that this would cause.
  • r

    ramirez

    09/27/2021, 1:27 AM
    hi guys I got this error: > "Could not find foreign keys between these entities. No relationship found between usuario_en_grupo and grupo" when selecting join tables here is my code `const { data: gruposUsuario, error } = await supabase .from('usuario_en_grupo') .select(
    id_grupo, grupo (id)
    );` and here is the database model, the RLS is disabled
  • r

    ramirez

    09/27/2021, 1:28 AM
    can you help me? I dont understand what's the problem
  • v

    Village

    09/27/2021, 2:52 AM
    Does auth work on self-hosted instances?
  • j

    jason-lynx

    09/27/2021, 3:25 AM
    that sounds like the foreign key
    id_grupo
    has not been set up to reference the
    id
    column in the
    grupo
    table yet, have you already done that?
  • j

    jason-lynx

    09/27/2021, 3:25 AM
    yes
  • r

    ramirez

    09/27/2021, 3:37 AM
    yes, I've recreated the table multiple times adding the foreign keys, the weird thing is that fetching other tables with joins works fine
    j
    • 2
    • 5
  • m

    Muphet

    09/27/2021, 8:33 AM
    how do you change supabase user role? i basically want to assign some admins so they can fetch all records while users have access only to those created by them
    s
    • 2
    • 7
  • s

    silentworks

    09/27/2021, 8:44 AM
    Role based permissions
  • v

    Village

    09/27/2021, 10:57 AM
    Thank you
1...959697...316Latest