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

    GandalfG

    08/10/2021, 3:21 PM
    Thats it! I disabled the RLS and i got the data back!!!
  • g

    GandalfG

    08/10/2021, 3:22 PM
    Sure. it worked now tho. Does this mean I need to add specific policies in order for it to work?
  • s

    Scott P

    08/10/2021, 3:23 PM
    In that case, it's an issue with the definition you've got in your policy.
    (uid() = user_id)
    (assuming that
    user_id
    is the name of your column where the user ID is stored) should fix it. Again, PG is weird about camelCasing in most places, including column names and table names
  • i

    ishaba

    08/10/2021, 3:23 PM
    Hello everyone! My project was paused for some time. Now after activating it i have some troubles with authentication even in supabase ui i get an error:
    Inviting user failed: Database error finding user
    and can't figure out how to solve it (i don't even need the old users)
  • s

    Sduu_

    08/10/2021, 3:24 PM
    @User Awesome, seems like there's no need for a call afterall
  • s

    Sduu_

    08/10/2021, 3:24 PM
    @User have you deleted the old users from the system?
  • g

    GandalfG

    08/10/2021, 3:27 PM
    Ok, will keep that in mind. Did not know about that. Yeah I think I need to update my policies.
  • i

    ishaba

    08/10/2021, 3:27 PM
    no actually i did not made any changes to database or auth
  • s

    Sduu_

    08/10/2021, 3:46 PM
    Now that I've reread your question. I don't know If I have enough knowledge on the issue or even have enough context to answer. What action is it exactly that are you trying to achieve on the UI that gives you that error?
  • i

    ishaba

    08/10/2021, 4:39 PM
    any action (invite, send magic link etc.) has same error
    ${action} failed: Database error finding user
  • s

    Scott P

    08/10/2021, 5:13 PM
    If you don't need the old users, delete them and recreate?
  • s

    swiss

    08/10/2021, 5:42 PM
    Hi all 👋 new here. Wondering if it's possible to create an enum column type. I'm used to working with blitz.js/prisma, where you can set enums for db columns, and I was hoping to do something similar in supabase but not sure how/if it's possible
  • f

    frubalu

    08/10/2021, 5:48 PM
    you can, you'd just need to write them through the SQL Editor. I haven't found a way to create one through the Dashboard UI
  • f

    frubalu

    08/10/2021, 5:50 PM
    i created one just the other day, looked something like this (note: i'm terrible at SQL and found this online somewhere)
    Copy code
    create type post_status as enum ('ACCEPTED', 'DECLINED', 'PENDING');
    ALTER TABLE posts
    ADD COLUMN status post_status;
  • s

    Scott P

    08/10/2021, 5:51 PM
    Beat me to it 😁 . I believe you'll be able to set the column type from the dashboard once the enum is created with the first line
  • f

    frubalu

    08/10/2021, 5:51 PM
    oh nice! so theoretically you only have to run that first line?
  • s

    Scott P

    08/10/2021, 5:51 PM
    I think so. I could be wrong, but I'm sure it's possible
  • f

    frubalu

    08/10/2021, 5:52 PM
    that makes sense to me, i know i've seen enums show up while i was messing around with something else
  • s

    Scott P

    08/10/2021, 5:52 PM
    Sure enough
  • s

    Scott P

    08/10/2021, 5:53 PM
    It only seems to show up on a specific table for me, but it's possible that's down to how I set mine up a few months ago
  • a

    aiddun

    08/10/2021, 7:22 PM
    is it possible to test auth email invites/password resets on localhost and not the site's domain (js sdk)? because i think the jwts it sends are for the 'site url' provided in the dashboard and for me it's rejecting them on localhost
  • b

    Breci

    08/10/2021, 7:48 PM
    Hi everyone 🙂 I do have a question about supabase auth. I'm considering supabase for some projects and I'm wondering if there is a way to auth from a custom flow? Basically on my apps, I receive a signed JWT from a website hosting my app and I auth based on it. Is there something similar to firestore's
    firebase.auth().signInWithCustomToken(token)
    ? Basically it creates an user without an email, and a userId based on the JWT token provided and the signIn check that user
  • m

    Mihai Andrei

    08/10/2021, 7:54 PM
    https://supabase.io/docs/gotrue/client/api-getuser
  • m

    Mihai Andrei

    08/10/2021, 7:54 PM
    I think you can use this similar
  • g

    GandalfG

    08/10/2021, 7:54 PM
    I think GoTrue can help you with this, which handles auth from JWT or even custom user data
  • m

    Mihai Andrei

    08/10/2021, 7:54 PM
    If the token doesnt corespond with a user, it will error
  • g

    GandalfG

    08/10/2021, 7:54 PM
    Haha nice 😉
  • m

    Mihai Andrei

    08/10/2021, 7:54 PM
    Otherwise, you get the user data
  • b

    Breci

    08/10/2021, 7:55 PM
    But is it possible to generate a token manually on the backend code? Like I call an endpoint an my app with my provided JWT, it validates it, and returns the supabase token so I can auth for supabase resources?
  • m

    Mihai Andrei

    08/10/2021, 7:56 PM
    You can generate the token yourself
1...434445...316Latest