https://supabase.com/ logo
Join Discord
Powered by
# javascript
  • p

    Pixeleate

    09/10/2021, 6:19 PM
    Hello everyone, I have a question, I'm using Supabase with Nextjs plus one of these (Netlify or Vercel) and I'm having a hard time to make the deploy-previews to work with Supabase auth, I mean if I put my public/production url on the Site URL box, all my deploy-previews or branch-previews redirect to the production site, so that doesn't work for testing, if I change my Site URL to match a deploy/branch preview, obviously the production site doesn't work, what's the approach everyone is following for this or there is no solution? Thanks in advance
  • s

    silentworks

    09/10/2021, 8:58 PM
    https://discord.com/channels/839993398554656828/885237287280070708/885992578321903616
  • u

    user

    09/11/2021, 9:55 AM
    Hi All, I have a quick question, what's the best way to query a jsonb field which is an array of objects?
  • u

    user

    09/11/2021, 9:56 AM
    the jsonb array of objects has an object which always has the field name and I want to make a query that selects based on the name provided
  • u

    user

    09/11/2021, 9:56 AM
    so I want to return each record with the name "John Doe" for example
  • m

    mornir

    09/11/2021, 12:15 PM
    Hey! After successfully authenticating with Discord, session data are automatically set in localstorage. But after the token expires, the user needs to authenticate with Discord again. Am I suppose to refresh the token on the client side? Is there any tutorial about this?
  • s

    silentworks

    09/11/2021, 12:28 PM
    It should auto-refresh itself
  • m

    mornir

    09/11/2021, 1:45 PM
    it refreshes, but if the user doesn't interact with the website for more than 1 hour, he needs to authenticate again.
  • m

    mornir

    09/11/2021, 1:58 PM
    what is strange is that localstorage is empty when I reopen the website after one hour. I'm on localhost, but it shouldn't matter, right?
  • s

    silentworks

    09/11/2021, 2:06 PM
    Yes this is correct behaviour.
  • m

    mornir

    09/11/2021, 3:00 PM
    ah okay I see. yes, it makes sense. But after signing in back with an auth provider, the user should be automatically logged in and shouldn't have to go through the oauth flow again. (maybe this is specific to the Discord oauth flow)
  • s

    silentworks

    09/11/2021, 4:05 PM
    I haven't tried the discord auth flow, but yes they shouldn't go through the entire oauth flow again
  • m

    mornir

    09/11/2021, 4:17 PM
    even though the app I created is listed under the authorised in my Discord account I still need to authorise it every time I sign in with Discord. @User do you have the same problem?
  • m

    mornir

    09/11/2021, 4:37 PM
    after doing some research, I think that supbase-js is using the implicit grant flow (https://discordjs.guide/oauth2/#implicit-grant-flow) which requires the user to "to explicitly re-authorize when the access token has expired".
  • q

    qu.est

    09/12/2021, 7:26 PM
    Hey, I've been trying to insert few details into supabase, but it gives me an error stating "invalid type for uuid" can anyone let me know what am I missing (edit) : removed the error message, since it contained some personal infomation
    s
    • 2
    • 7
  • q

    qu.est

    09/12/2021, 7:33 PM
    id ad user_id are uuid in supabase
  • s

    silentworks

    09/12/2021, 8:08 PM
    Invalid type for uuid error
  • b

    bokolesnik

    09/13/2021, 2:22 PM
    Hello, receiving an empty array with js. How to fix? let { data: categories, error } = await supabase .from('categories') .select('*')
  • s

    stibbs

    09/13/2021, 8:02 PM
    Is there anything in your categories table?
  • b

    Brock

    09/13/2021, 8:17 PM
    Do you have RLS on? If so and you have not set up a select policy, you will get back an empty array.
  • b

    burggraf

    09/14/2021, 12:20 AM
    If you just turn RLS on the default is no access at all - just a reminder. If you flip that RLS switch you’re shutting down all access to that table. Which could be exactly what you want - just be aware.
  • b

    bokolesnik

    09/14/2021, 8:54 AM
    Is possible to batch update with a filter with Supabase JS package? One request with 1000 rows to update with own match() filters. MongoDB alternative is
    .bulkWrite(array)
  • s

    shahpriyansh04

    09/14/2021, 6:12 PM
    Hello I am relatively new to supabase and was wondering what is the supabase alternative of signInWithPopup method of firebase auth
  • s

    shahpriyansh04

    09/14/2021, 6:12 PM
    Can anyone pls help me with this ?
  • b

    Brock

    09/14/2021, 6:16 PM
    Google Auth docs: https://supabase.io/docs/guides/auth/auth-google
  • s

    shahpriyansh04

    09/14/2021, 6:19 PM
    I got basic auth part What i want is to sign in using a popup so i dont lose the state of my page
  • b

    Brock

    09/14/2021, 6:19 PM
    Popup like a modal?
  • s

    shahpriyansh04

    09/14/2021, 6:20 PM
    No
  • s

    shahpriyansh04

    09/14/2021, 6:20 PM
    https://firebase.google.com/docs/auth/web/google-signin
  • s

    shahpriyansh04

    09/14/2021, 6:20 PM
    Check the 5th point
1...181920...81Latest