https://supabase.com/ logo
Join Discord
Powered by
# off-topic
  • t

    tinjaw

    08/29/2021, 11:38 PM
    I do not know what you are referring to. I am referring to https://developers.cloudflare.com/workers/tutorials/postgres
  • s

    Scott P

    08/29/2021, 11:38 PM
    It's at the bottom of that page
  • s

    Scott P

    08/29/2021, 11:40 PM
    Also, it was written at the start of this month
  • t

    tinjaw

    08/29/2021, 11:40 PM
    Then where the heck are the instructions for creating the proper
    POSTGREST_ENDPOINT
    ?
  • s

    Scott P

    08/29/2021, 11:41 PM
    https://your-project-id.supabase.io/rest/v1/
    is the default endpoint for Postgrest. You might need to add
    ?apikey=your-postgrest-token
    to the end
  • t

    tinjaw

    08/29/2021, 11:43 PM
    You might need to add ?apikey=your-postgrest-token to the end
    . <<<< THAT is what I have spent the past 30 or so minutes looking for I guess
  • t

    tinjaw

    08/29/2021, 11:45 PM
    getting
    "value": "Invalid authentication credentials"
  • t

    tinjaw

    08/29/2021, 11:45 PM
    BRB
  • t

    tinjaw

    08/29/2021, 11:50 PM
    hmm, got it to work in Paw
  • t

    tinjaw

    08/29/2021, 11:50 PM
    Must be an error in my code somewhere
  • s

    Scott P

    08/29/2021, 11:51 PM
    1: Go to https://jwt.io/ 2: In the 'payload' field, add the following (source: https://supabase.io/docs/guides/self-hosting#configuring-each-service):
    Copy code
    json
    {
     "iss": "supabase",
     "iat": 1603968834,
     "exp": 2550653634,
     "aud": "",
     "sub": "",
     "role": "service_role"
    }
    3: In the 'verify signature' field, add your service-role JWT found in the dashboard. 4: The generated JWT is your API key Alternatively, use the anon JSON from the link above, and add your public JWT key instead in the instructions above. It might even be possible to just use the API key that's listed in the dashboard instead of going through this process. It might work, it might not - I can't remember the full technicalities of it. Let's move this to a thread so it doesn't clutter up general any more
    t
    k
    • 3
    • 9
  • j

    jonny

    08/30/2021, 9:15 AM
    working on it right now 😄
  • j

    jonny

    08/30/2021, 9:35 AM
    we've just released a fix for this. should be possible to disable email sign ups now
  • j

    jak

    08/30/2021, 11:28 AM
    Struggling with structure one-to-many relationships in Supabase. any tips? The scenario: I'm working on a commercial real estate app. Each building has lots of different characteristics (it's got a reception area, roof terrace, 24/7 access, etc). Each characteristic has its own description, icon and more. In my front end, for each building I would like a list of it's characteristics. What would be a good way to structure this in Supabase?
    a
    h
    m
    • 4
    • 30
  • p

    philhawksworth

    08/30/2021, 11:44 AM
    Hoping this question about upserting isn't a dupe... I've seen some chatter before but not quite what I'm looking for: Is it possible to specify which fields should be matched vs which should be updated in an upsert? So that if a record is found where fields A and B are found to have the same value as that being inserted, but C is different, that record is updated to have the new value of field C.
  • a

    apollonian

    08/30/2021, 12:59 PM
    Relationships
  • h

    HorseShoe

    08/30/2021, 1:33 PM
    Hai, i was wondering if i cud use hasura just for realtime subscriptions
  • h

    HorseShoe

    08/30/2021, 1:34 PM
    where do i pass the jwt in order for uid() to work?
  • l

    lunex

    08/30/2021, 2:01 PM
    @User what is the color code of the start your project button (green) on the site
    b
    a
    s
    • 4
    • 13
  • t

    team

    08/30/2021, 3:37 PM
    weird I still get the same error in the console after clicking the save button. is it possible that your update is not fully deployed yet?
  • s

    silentworks

    08/30/2021, 3:42 PM
    I would say try and log out and log back in. Also try and clear the cache. I'm not sure if the dashboard is using service workers, if yes then these could be causing you to not see the changes.
  • t

    team

    08/30/2021, 3:50 PM
    Oh man, service workers can be evil haha. Just blew away the Chrome cache and re-logged in and I'm still seeing the original error. Also tried creating a fresh session in Firefox which I've never used with supabase.io before and still seeing the original error.
    s
    • 2
    • 13
  • s

    Scott Prins

    08/30/2021, 3:54 PM
    How does one go about seeding the DB with supabase? I figure adding a 'dev' project and 'prod' project to separate data entities and such is a good idea, but if I wanted to seed the 'dev' instance easily with some JSON or something what would be the fastest route?
    s
    • 2
    • 6
  • j

    jak

    08/30/2021, 4:43 PM
    Are there any plans to add Linkedin as an Auth Provider?
  • u

    user

    08/30/2021, 4:51 PM
    Hey, I'm trying out supabase auth for the first time rn. As i know the auth flow of smth like Keycloak there is some kind of "validator" endpoint where i can send the auth token key to validate if the token is still valid
  • b

    burggraf

    08/30/2021, 5:25 PM
    @User might know if this is planned
  • t

    team

    08/30/2021, 6:25 PM
    if your goal is just to maintain a valid token, the Supabase client will do that automatically with the default settings https://github.com/supabase/supabase-js/blob/93b51af3c90beed8641e93994b6eaf44860fe77c/src/SupabaseClient.ts#L11 if your goal is to manually check the validity yourself, you can either get the expiration UTC timestamp that is available from the
    expires_at
    property on the session data, or you can just decode the
    access_token
    from the session data with a JWT decoding library, which will contain the same UTC timestamp as the
    expires_at
    property, and then compare that value to the current UTC timestamp in seconds, so you can determine the validity of the token without a network request.
  • u

    user

    08/30/2021, 6:28 PM
    ah ok, @User thank you! Just remembered that i had to implement a flow like this myself using Oauth2 and Keycloak
  • j

    jon.m

    08/30/2021, 10:24 PM
    any best practices to be aware of regarding indexes use in supabase?
  • s

    silentworks

    08/30/2021, 10:36 PM
    This wouldn't be supabase specific, its worth more looking into what's best to index in your database (your database being Postgres in this case).
1...929394...392Latest