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

    chizom

    12/27/2021, 9:24 AM
    ?
  • c

    chizom

    12/27/2021, 9:24 AM
    @User
  • k

    ktosiek

    12/27/2021, 9:28 AM
    Well, if you skip using the supabase lib then you get to manage user tokens yourself 😉 You'll need to get authentication_token (or something like that) from the successful login response, and use that with all your other API calls. But: that token has a short TTL, so you'll also want to store the refresh_token somewhere too (those are single use, you get a new one on each refresh).
  • c

    chizom

    12/27/2021, 9:30 AM
    Hmmmm
  • c

    chizom

    12/27/2021, 9:30 AM
    that means I should just use the lib 😂
  • c

    chizom

    12/27/2021, 9:33 AM
    how do I get the authentication_token from the successful login response (it is not listed as part of the response) Please don't be angry about my questions. I love what SupaBase is about, I just want to work with it differently sometimes
  • c

    chizom

    12/27/2021, 9:33 AM
    Thank you for your assistance so far
  • k

    ktosiek

    12/27/2021, 9:35 AM
    I'm not angry by any stretch, but I am busy. Maybe someone else will have an idea, or you can look through gotrue-js code
  • c

    chizom

    12/27/2021, 9:37 AM
    Thank you
  • c

    chizom

    12/27/2021, 9:38 AM
    please where is the code? I just joined the discord server
  • l

    lorencerri

    12/27/2021, 9:40 AM
    Is there an example of a somewhat complex RLS policy? I'm trying to reference a foreign key in it and seeing an example would be great
  • d

    DodiaPrashant

    12/27/2021, 9:49 AM
    Is there any option to get supabase tables schema?
  • a

    anothercoder

    12/27/2021, 11:04 AM
    https://supabase.com/docs/guides/auth/row-level-security
  • d

    DBSR

    12/27/2021, 2:12 PM
    Hi! I seem to be unable to create and edit custom schemas in Supabase Studio. Does anybody have an idea on how to fix this?
  • t

    Tarky

    12/27/2021, 3:33 PM
    Hello, what I am reading in the docs is that supabase uses JWT for auth, correct?
  • t

    Tarky

    12/27/2021, 3:33 PM
    Is there a way to use session cookies ?
  • r

    rudolfbono

    12/27/2021, 3:49 PM
    Should I be committing the
    supabase/migrations
    directory to version control?
  • c

    chipilov

    12/27/2021, 3:51 PM
    I am not an expert here, but as far as I know there is a way, albeit not as easy as JWT. You basically need to call supabase.auth.api.setAuthCookie() and supabase.auth.api.getUserByCookie() on your server side
  • t

    Tarky

    12/27/2021, 4:18 PM
    Ah okay I will take a look
  • s

    Subramanya Chakravarthy

    12/27/2021, 5:21 PM
    Any postgres experts here? How can I convert geolocation to readable text in this function? Postgis provides
    ST_AsText
    but not sure how to use it
    Copy code
    sql
    create or replace function public.nearby_deals(longitude float, latitude float, radius int)
    returns table(id int, title text, description text, dealer uuid, geolocation geography(point))
    as $body$
      select
        deals.id,
        deals.title,
        deals.description,
        deals.dealer,
        deals.geolocation,
        deals.location
      from deals
      where ST_DWithin(deals.geolocation, ST_SetSRID(ST_MakePoint(longitude, latitude),4326), radius)
    $body$
    language sql;
  • k

    kresimirgalic

    12/27/2021, 5:32 PM
    Did anyone create cron jobs? I want to create cron job which alerts users by sending email in certain time
  • s

    saudev001

    12/27/2021, 5:45 PM
    What should one know if one wants to do open-source contribution in Supabase? Is there any video tutorial showing how to set up the project for that purpose?
  • d

    Deleted User

    12/27/2021, 7:31 PM
    Is there a way to get a user's email from the javascript client library using their ID?
  • k

    ktosiek

    12/27/2021, 8:13 PM
    do you mean for any user, or for the current user?
  • k

    ktosiek

    12/27/2021, 8:13 PM
    for current user you can look in supabase.auth.currentUser
  • m

    mansedan

    12/27/2021, 8:22 PM
    Hey guys - is it possible to create a table where the rows would auto expire/delete after X days?
  • d

    Deleted User

    12/27/2021, 8:42 PM
    For any user
  • k

    ktosiek

    12/27/2021, 9:15 PM
    You'd need a custom view or function to expose that data. It's in a table in the "auth" schema, but I can't remember how it's called.
  • k

    ktosiek

    12/27/2021, 9:16 PM
    I'd make a policy that filters data by timestamp, and a separate periodic task that removes old data
  • m

    mansedan

    12/27/2021, 9:29 PM
    Thank you! i'll look into implementing this
1...174175176...316Latest